﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Data;
using System.Data.SqlClient;

namespace BaoShouTangServer.ApiModels
{
    public class pu_arrbody
    {
        public pu_arrbody()
        { }
        #region Model
        private int? _id;
        private string _cwhcode;
        private string _cwhname;
        private int _autoid;
        private string _cinvcode;
        private string _cinvaddcode;
        private string _cinvname;
        private string _cinvstd;
        private string _cinvccode;
        private string _cunitid;
        private string _ccomunitcode;
        private string _cinvm_unit;
        private int? _igrouptype;
        private string _cgroupcode;
        private string _cinva_unit;
        private bool _bservice;
        private decimal? _iinvexchrate;
        private bool _binvbatch;
        private string _cbatch;
        private DateTime? _dvdate;
        private DateTime? _dpdate;
        private int? _imassdate;
        private int? _cmassunit;
        private string _cgspstate;
        private string _ccloser;
        private decimal? _ioritaxcost;
        private int? _icorid;
        private decimal _iquantity;
        private decimal? _inum;
        private decimal? _ioricost;
        private decimal? _iorimoney;
        private decimal? _ioritaxprice;
        private decimal? _iorisum;
        private decimal? _icost;
        private decimal? _imoney;
        private decimal? _itaxprice;
        private decimal? _isum;
        private string _cbcloser;
        private string _cfree1;
        private string _cfree2;
        private string _cdefine22;
        private string _cdefine23;
        private string _cdefine24;
        private string _cdefine25;
        private decimal? _cdefine26;
        private decimal? _cdefine27;
        private string _cdefine28;
        private string _cdefine29;
        private string _cdefine30;
        private string _cdefine31;
        private string _cdefine32;
        private string _cdefine33;
        private int? _cdefine34;
        private int? _cdefine35;
        private DateTime? _cdefine36;
        private DateTime? _cdefine37;
        private decimal _itaxrate;
        private string _citemcode;
        private string _citemname;
        private string _citem_class;
        private string _citem_name;
        private int? _iposid;
        private decimal? _fvalidquantity;
        private decimal? _fvalidnum;
        private decimal? _fvalidinquan;
        private decimal? _fvalidinnum;
        private decimal? _fkpquantity;
        private decimal? _finvalidquantity;
        private decimal? _finvalidnum;
        private decimal? _finvalidinquan;
        private decimal? _fretquantity;
        private decimal? _frefusequantity;
        private decimal? _frefusenum;
        private decimal? _frealquantity;
        private decimal? _frealnum;
        private string _cfree3;
        private string _cfree4;
        private string _cfree5;
        private string _cfree6;
        private string _cfree7;
        private string _cfree8;
        private string _cfree9;
        private string _cfree10;
        private string _cinvdefine1;
        private string _cinvdefine2;
        private string _cinvdefine3;
        private string _cinvdefine4;
        private string _cinvdefine5;
        private string _cinvdefine6;
        private string _cinvdefine7;
        private string _cinvdefine8;
        private string _cinvdefine9;
        private string _cinvdefine10;
        private int? _cinvdefine11;
        private int? _cinvdefine12;
        private decimal? _cinvdefine13;
        private decimal? _cinvdefine14;
        private DateTime? _cinvdefine15;
        private DateTime? _cinvdefine16;
        private bool _rejectsource;
        private int _bgsp;
        private int? _cinvauthid;
        private bool _btaxcost;
        private int _binspect;
        private Guid _contractrowguid;
        private decimal? _iinvmpcost;
        private int? _irowno;
        private int _sotype;
        private string _csocode;
        private string _cdemandmemo;
        private int _iordertype;
        private string _csoordercode;
        private int? _iorderseq;
        private int? _iorderdid;
        private int? _ippartid;
        private decimal? _ipquantity;
        private int? _iptoseq;
        private string _cveninvcode;
        private string _cveninvname;
        private string _sodid;
        private string _cordercode;
        private int _bexigency;
        private string _contractcode;
        private string _contractrowno;
        private decimal? _fretnum;
        private decimal? _fsumrefusequantity;
        private decimal? _fsumrefusenum;
        private decimal? _fdtquantity;
        private decimal? _finvalidinnum;
        private decimal? _finspectquantity;
        private decimal? _finspectnum;
        private int _vouchstate;
        private decimal? _fininquantity;
        private decimal? _fininnum;
        private string _dvalidatedate;
        private decimal? _inspecexchrate;
        private int? _irejectautoid;
        private int? _iexpiratdatecalcu;
        private string _cexpirationdate;
        private DateTime? _dexpirationdate;
        private string _carrivalcode;
        private decimal? _cbatchproperty1;
        private decimal? _cbatchproperty2;
        private decimal? _cbatchproperty3;
        private decimal? _cbatchproperty4;
        private decimal? _cbatchproperty5;
        private string _cbatchproperty6;
        private string _cbatchproperty7;
        private string _cbatchproperty8;
        private string _cbatchproperty9;
        private DateTime? _cbatchproperty10;
        private string _cupsocode;
        private int? _ivouchrowno;
        private string _cbmemo;
        private string _cbsysbarcode;
        private int _iproducttype;
        private string _cmaininvcode;
        private int? _imainmodetailsid;
        private string _isourcemocode;
        private int? _isourcemodetailsid;
        private decimal? _freworkquantity;
        private decimal? _freworknum;
        private decimal? _fsumreworkquantity;
        private decimal? _fsumreworknum;
        private string _planlotnumber;
        private int? _bgift;
        private DateTime? _dlineclosedate;
        private string _cfactorycode;
        private string _cfactoryname;
        /// <summary>
        /// 
        /// </summary>
        public int? id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cwhcode
        {
            set { _cwhcode = value; }
            get { return _cwhcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cwhname
        {
            set { _cwhname = value; }
            get { return _cwhname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int autoid
        {
            set { _autoid = value; }
            get { return _autoid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvcode
        {
            set { _cinvcode = value; }
            get { return _cinvcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvaddcode
        {
            set { _cinvaddcode = value; }
            get { return _cinvaddcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvname
        {
            set { _cinvname = value; }
            get { return _cinvname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvstd
        {
            set { _cinvstd = value; }
            get { return _cinvstd; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvccode
        {
            set { _cinvccode = value; }
            get { return _cinvccode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cunitid
        {
            set { _cunitid = value; }
            get { return _cunitid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ccomunitcode
        {
            set { _ccomunitcode = value; }
            get { return _ccomunitcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvm_unit
        {
            set { _cinvm_unit = value; }
            get { return _cinvm_unit; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? igrouptype
        {
            set { _igrouptype = value; }
            get { return _igrouptype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cgroupcode
        {
            set { _cgroupcode = value; }
            get { return _cgroupcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinva_unit
        {
            set { _cinva_unit = value; }
            get { return _cinva_unit; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool bservice
        {
            set { _bservice = value; }
            get { return _bservice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iinvexchrate
        {
            set { _iinvexchrate = value; }
            get { return _iinvexchrate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool binvbatch
        {
            set { _binvbatch = value; }
            get { return _binvbatch; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbatch
        {
            set { _cbatch = value; }
            get { return _cbatch; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? dvdate
        {
            set { _dvdate = value; }
            get { return _dvdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? dpdate
        {
            set { _dpdate = value; }
            get { return _dpdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? imassdate
        {
            set { _imassdate = value; }
            get { return _imassdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cmassunit
        {
            set { _cmassunit = value; }
            get { return _cmassunit; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cgspstate
        {
            set { _cgspstate = value; }
            get { return _cgspstate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ccloser
        {
            set { _ccloser = value; }
            get { return _ccloser; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ioritaxcost
        {
            set { _ioritaxcost = value; }
            get { return _ioritaxcost; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? icorid
        {
            set { _icorid = value; }
            get { return _icorid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal iquantity
        {
            set { _iquantity = value; }
            get { return _iquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inum
        {
            set { _inum = value; }
            get { return _inum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ioricost
        {
            set { _ioricost = value; }
            get { return _ioricost; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iorimoney
        {
            set { _iorimoney = value; }
            get { return _iorimoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ioritaxprice
        {
            set { _ioritaxprice = value; }
            get { return _ioritaxprice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iorisum
        {
            set { _iorisum = value; }
            get { return _iorisum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? icost
        {
            set { _icost = value; }
            get { return _icost; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? imoney
        {
            set { _imoney = value; }
            get { return _imoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? itaxprice
        {
            set { _itaxprice = value; }
            get { return _itaxprice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? isum
        {
            set { _isum = value; }
            get { return _isum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbcloser
        {
            set { _cbcloser = value; }
            get { return _cbcloser; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree1
        {
            set { _cfree1 = value; }
            get { return _cfree1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree2
        {
            set { _cfree2 = value; }
            get { return _cfree2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine22
        {
            set { _cdefine22 = value; }
            get { return _cdefine22; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine23
        {
            set { _cdefine23 = value; }
            get { return _cdefine23; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine24
        {
            set { _cdefine24 = value; }
            get { return _cdefine24; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine25
        {
            set { _cdefine25 = value; }
            get { return _cdefine25; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cdefine26
        {
            set { _cdefine26 = value; }
            get { return _cdefine26; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cdefine27
        {
            set { _cdefine27 = value; }
            get { return _cdefine27; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine28
        {
            set { _cdefine28 = value; }
            get { return _cdefine28; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine29
        {
            set { _cdefine29 = value; }
            get { return _cdefine29; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine30
        {
            set { _cdefine30 = value; }
            get { return _cdefine30; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine31
        {
            set { _cdefine31 = value; }
            get { return _cdefine31; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine32
        {
            set { _cdefine32 = value; }
            get { return _cdefine32; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine33
        {
            set { _cdefine33 = value; }
            get { return _cdefine33; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cdefine34
        {
            set { _cdefine34 = value; }
            get { return _cdefine34; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cdefine35
        {
            set { _cdefine35 = value; }
            get { return _cdefine35; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cdefine36
        {
            set { _cdefine36 = value; }
            get { return _cdefine36; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cdefine37
        {
            set { _cdefine37 = value; }
            get { return _cdefine37; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal itaxrate
        {
            set { _itaxrate = value; }
            get { return _itaxrate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string citemcode
        {
            set { _citemcode = value; }
            get { return _citemcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string citemname
        {
            set { _citemname = value; }
            get { return _citemname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string citem_class
        {
            set { _citem_class = value; }
            get { return _citem_class; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string citem_name
        {
            set { _citem_name = value; }
            get { return _citem_name; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iposid
        {
            set { _iposid = value; }
            get { return _iposid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fvalidquantity
        {
            set { _fvalidquantity = value; }
            get { return _fvalidquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fvalidnum
        {
            set { _fvalidnum = value; }
            get { return _fvalidnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fvalidinquan
        {
            set { _fvalidinquan = value; }
            get { return _fvalidinquan; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fvalidinnum
        {
            set { _fvalidinnum = value; }
            get { return _fvalidinnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fkpquantity
        {
            set { _fkpquantity = value; }
            get { return _fkpquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? finvalidquantity
        {
            set { _finvalidquantity = value; }
            get { return _finvalidquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? finvalidnum
        {
            set { _finvalidnum = value; }
            get { return _finvalidnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? finvalidinquan
        {
            set { _finvalidinquan = value; }
            get { return _finvalidinquan; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fretquantity
        {
            set { _fretquantity = value; }
            get { return _fretquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? frefusequantity
        {
            set { _frefusequantity = value; }
            get { return _frefusequantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? frefusenum
        {
            set { _frefusenum = value; }
            get { return _frefusenum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? frealquantity
        {
            set { _frealquantity = value; }
            get { return _frealquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? frealnum
        {
            set { _frealnum = value; }
            get { return _frealnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree3
        {
            set { _cfree3 = value; }
            get { return _cfree3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree4
        {
            set { _cfree4 = value; }
            get { return _cfree4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree5
        {
            set { _cfree5 = value; }
            get { return _cfree5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree6
        {
            set { _cfree6 = value; }
            get { return _cfree6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree7
        {
            set { _cfree7 = value; }
            get { return _cfree7; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree8
        {
            set { _cfree8 = value; }
            get { return _cfree8; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree9
        {
            set { _cfree9 = value; }
            get { return _cfree9; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree10
        {
            set { _cfree10 = value; }
            get { return _cfree10; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine1
        {
            set { _cinvdefine1 = value; }
            get { return _cinvdefine1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine2
        {
            set { _cinvdefine2 = value; }
            get { return _cinvdefine2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine3
        {
            set { _cinvdefine3 = value; }
            get { return _cinvdefine3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine4
        {
            set { _cinvdefine4 = value; }
            get { return _cinvdefine4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine5
        {
            set { _cinvdefine5 = value; }
            get { return _cinvdefine5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine6
        {
            set { _cinvdefine6 = value; }
            get { return _cinvdefine6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine7
        {
            set { _cinvdefine7 = value; }
            get { return _cinvdefine7; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine8
        {
            set { _cinvdefine8 = value; }
            get { return _cinvdefine8; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine9
        {
            set { _cinvdefine9 = value; }
            get { return _cinvdefine9; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine10
        {
            set { _cinvdefine10 = value; }
            get { return _cinvdefine10; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cinvdefine11
        {
            set { _cinvdefine11 = value; }
            get { return _cinvdefine11; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cinvdefine12
        {
            set { _cinvdefine12 = value; }
            get { return _cinvdefine12; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cinvdefine13
        {
            set { _cinvdefine13 = value; }
            get { return _cinvdefine13; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cinvdefine14
        {
            set { _cinvdefine14 = value; }
            get { return _cinvdefine14; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cinvdefine15
        {
            set { _cinvdefine15 = value; }
            get { return _cinvdefine15; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cinvdefine16
        {
            set { _cinvdefine16 = value; }
            get { return _cinvdefine16; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool rejectsource
        {
            set { _rejectsource = value; }
            get { return _rejectsource; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int bgsp
        {
            set { _bgsp = value; }
            get { return _bgsp; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cinvauthid
        {
            set { _cinvauthid = value; }
            get { return _cinvauthid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool btaxcost
        {
            set { _btaxcost = value; }
            get { return _btaxcost; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int binspect
        {
            set { _binspect = value; }
            get { return _binspect; }
        }
        /// <summary>
        /// 
        /// </summary>
        public Guid contractrowguid
        {
            set { _contractrowguid = value; }
            get { return _contractrowguid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iinvmpcost
        {
            set { _iinvmpcost = value; }
            get { return _iinvmpcost; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? irowno
        {
            set { _irowno = value; }
            get { return _irowno; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int sotype
        {
            set { _sotype = value; }
            get { return _sotype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string csocode
        {
            set { _csocode = value; }
            get { return _csocode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdemandmemo
        {
            set { _cdemandmemo = value; }
            get { return _cdemandmemo; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int iordertype
        {
            set { _iordertype = value; }
            get { return _iordertype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string csoordercode
        {
            set { _csoordercode = value; }
            get { return _csoordercode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iorderseq
        {
            set { _iorderseq = value; }
            get { return _iorderseq; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iorderdid
        {
            set { _iorderdid = value; }
            get { return _iorderdid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? ippartid
        {
            set { _ippartid = value; }
            get { return _ippartid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ipquantity
        {
            set { _ipquantity = value; }
            get { return _ipquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iptoseq
        {
            set { _iptoseq = value; }
            get { return _iptoseq; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cveninvcode
        {
            set { _cveninvcode = value; }
            get { return _cveninvcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cveninvname
        {
            set { _cveninvname = value; }
            get { return _cveninvname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string sodid
        {
            set { _sodid = value; }
            get { return _sodid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cordercode
        {
            set { _cordercode = value; }
            get { return _cordercode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int bexigency
        {
            set { _bexigency = value; }
            get { return _bexigency; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string contractcode
        {
            set { _contractcode = value; }
            get { return _contractcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string contractrowno
        {
            set { _contractrowno = value; }
            get { return _contractrowno; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fretnum
        {
            set { _fretnum = value; }
            get { return _fretnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fsumrefusequantity
        {
            set { _fsumrefusequantity = value; }
            get { return _fsumrefusequantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fsumrefusenum
        {
            set { _fsumrefusenum = value; }
            get { return _fsumrefusenum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fdtquantity
        {
            set { _fdtquantity = value; }
            get { return _fdtquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? finvalidinnum
        {
            set { _finvalidinnum = value; }
            get { return _finvalidinnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? finspectquantity
        {
            set { _finspectquantity = value; }
            get { return _finspectquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? finspectnum
        {
            set { _finspectnum = value; }
            get { return _finspectnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int vouchstate
        {
            set { _vouchstate = value; }
            get { return _vouchstate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fininquantity
        {
            set { _fininquantity = value; }
            get { return _fininquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fininnum
        {
            set { _fininnum = value; }
            get { return _fininnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string dValidateDate
        {
            set { _dvalidatedate = value; }
            get { return _dvalidatedate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inspecexchrate
        {
            set { _inspecexchrate = value; }
            get { return _inspecexchrate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? irejectautoid
        {
            set { _irejectautoid = value; }
            get { return _irejectautoid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iexpiratdatecalcu
        {
            set { _iexpiratdatecalcu = value; }
            get { return _iexpiratdatecalcu; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cexpirationdate
        {
            set { _cexpirationdate = value; }
            get { return _cexpirationdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? dexpirationdate
        {
            set { _dexpirationdate = value; }
            get { return _dexpirationdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string carrivalcode
        {
            set { _carrivalcode = value; }
            get { return _carrivalcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cbatchproperty1
        {
            set { _cbatchproperty1 = value; }
            get { return _cbatchproperty1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cbatchproperty2
        {
            set { _cbatchproperty2 = value; }
            get { return _cbatchproperty2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cbatchproperty3
        {
            set { _cbatchproperty3 = value; }
            get { return _cbatchproperty3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cbatchproperty4
        {
            set { _cbatchproperty4 = value; }
            get { return _cbatchproperty4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cbatchproperty5
        {
            set { _cbatchproperty5 = value; }
            get { return _cbatchproperty5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbatchproperty6
        {
            set { _cbatchproperty6 = value; }
            get { return _cbatchproperty6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbatchproperty7
        {
            set { _cbatchproperty7 = value; }
            get { return _cbatchproperty7; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbatchproperty8
        {
            set { _cbatchproperty8 = value; }
            get { return _cbatchproperty8; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbatchproperty9
        {
            set { _cbatchproperty9 = value; }
            get { return _cbatchproperty9; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cbatchproperty10
        {
            set { _cbatchproperty10 = value; }
            get { return _cbatchproperty10; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cupsocode
        {
            set { _cupsocode = value; }
            get { return _cupsocode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? ivouchrowno
        {
            set { _ivouchrowno = value; }
            get { return _ivouchrowno; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbmemo
        {
            set { _cbmemo = value; }
            get { return _cbmemo; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbsysbarcode
        {
            set { _cbsysbarcode = value; }
            get { return _cbsysbarcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int iproducttype
        {
            set { _iproducttype = value; }
            get { return _iproducttype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cmaininvcode
        {
            set { _cmaininvcode = value; }
            get { return _cmaininvcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? imainmodetailsid
        {
            set { _imainmodetailsid = value; }
            get { return _imainmodetailsid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string isourcemocode
        {
            set { _isourcemocode = value; }
            get { return _isourcemocode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? isourcemodetailsid
        {
            set { _isourcemodetailsid = value; }
            get { return _isourcemodetailsid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? freworkquantity
        {
            set { _freworkquantity = value; }
            get { return _freworkquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? freworknum
        {
            set { _freworknum = value; }
            get { return _freworknum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fsumreworkquantity
        {
            set { _fsumreworkquantity = value; }
            get { return _fsumreworkquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fsumreworknum
        {
            set { _fsumreworknum = value; }
            get { return _fsumreworknum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string planlotnumber
        {
            set { _planlotnumber = value; }
            get { return _planlotnumber; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? bgift
        {
            set { _bgift = value; }
            get { return _bgift; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? dlineclosedate
        {
            set { _dlineclosedate = value; }
            get { return _dlineclosedate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfactorycode
        {
            set { _cfactorycode = value; }
            get { return _cfactorycode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfactoryname
        {
            set { _cfactoryname = value; }
            get { return _cfactoryname; }
        }
        #endregion Model


        #region  Method


        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int id, string cwhcode, string cwhname, int autoid, string cinvcode, string cinvaddcode, string cinvname, string cinvstd, string cinvccode, string cunitid, string ccomunitcode, string cinvm_unit, int igrouptype, string cgroupcode, string cinva_unit, bool bservice, decimal iinvexchrate, bool binvbatch, string cbatch, DateTime dvdate, DateTime dpdate, int imassdate, int cmassunit, string cgspstate, string ccloser, decimal ioritaxcost, int icorid, decimal iquantity, decimal inum, decimal ioricost, decimal iorimoney, decimal ioritaxprice, decimal iorisum, decimal icost, decimal imoney, decimal itaxprice, decimal isum, string cbcloser, string cfree1, string cfree2, string cdefine22, string cdefine23, string cdefine24, string cdefine25, decimal cdefine26, decimal cdefine27, string cdefine28, string cdefine29, string cdefine30, string cdefine31, string cdefine32, string cdefine33, int cdefine34, int cdefine35, DateTime cdefine36, DateTime cdefine37, decimal itaxrate, string citemcode, string citemname, string citem_class, string citem_name, int iposid, decimal fvalidquantity, decimal fvalidnum, decimal fvalidinquan, decimal fvalidinnum, decimal fkpquantity, decimal finvalidquantity, decimal finvalidnum, decimal finvalidinquan, decimal fretquantity, decimal frefusequantity, decimal frefusenum, decimal frealquantity, decimal frealnum, string cfree3, string cfree4, string cfree5, string cfree6, string cfree7, string cfree8, string cfree9, string cfree10, string cinvdefine1, string cinvdefine2, string cinvdefine3, string cinvdefine4, string cinvdefine5, string cinvdefine6, string cinvdefine7, string cinvdefine8, string cinvdefine9, string cinvdefine10, int cinvdefine11, int cinvdefine12, decimal cinvdefine13, decimal cinvdefine14, DateTime cinvdefine15, DateTime cinvdefine16, bool rejectsource, int bgsp, int cinvauthid, bool btaxcost, int binspect, Guid contractrowguid, decimal iinvmpcost, int irowno, int sotype, string csocode, string cdemandmemo, int iordertype, string csoordercode, int iorderseq, int iorderdid, int ippartid, decimal ipquantity, int iptoseq, string cveninvcode, string cveninvname, string sodid, string cordercode, int bexigency, string contractcode, string contractrowno, decimal fretnum, decimal fsumrefusequantity, decimal fsumrefusenum, decimal fdtquantity, decimal finvalidinnum, decimal finspectquantity, decimal finspectnum, int vouchstate, decimal fininquantity, decimal fininnum, string dValidateDate, decimal inspecexchrate, int irejectautoid, int iexpiratdatecalcu, string cexpirationdate, DateTime dexpirationdate, string carrivalcode, decimal cbatchproperty1, decimal cbatchproperty2, decimal cbatchproperty3, decimal cbatchproperty4, decimal cbatchproperty5, string cbatchproperty6, string cbatchproperty7, string cbatchproperty8, string cbatchproperty9, DateTime cbatchproperty10, string cupsocode, int ivouchrowno, string cbmemo, string cbsysbarcode, int iproducttype, string cmaininvcode, int imainmodetailsid, string isourcemocode, int isourcemodetailsid, decimal freworkquantity, decimal freworknum, decimal fsumreworkquantity, decimal fsumreworknum, string planlotnumber, int bgift, DateTime dlineclosedate, string cfactorycode, string cfactoryname)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from [pu_arrbody]");
            strSql.Append(" where id=@id and cwhcode=@cwhcode and cwhname=@cwhname and autoid=@autoid and cinvcode=@cinvcode and cinvaddcode=@cinvaddcode and cinvname=@cinvname and cinvstd=@cinvstd and cinvccode=@cinvccode and cunitid=@cunitid and ccomunitcode=@ccomunitcode and cinvm_unit=@cinvm_unit and igrouptype=@igrouptype and cgroupcode=@cgroupcode and cinva_unit=@cinva_unit and bservice=@bservice and iinvexchrate=@iinvexchrate and binvbatch=@binvbatch and cbatch=@cbatch and dvdate=@dvdate and dpdate=@dpdate and imassdate=@imassdate and cmassunit=@cmassunit and cgspstate=@cgspstate and ccloser=@ccloser and ioritaxcost=@ioritaxcost and icorid=@icorid and iquantity=@iquantity and inum=@inum and ioricost=@ioricost and iorimoney=@iorimoney and ioritaxprice=@ioritaxprice and iorisum=@iorisum and icost=@icost and imoney=@imoney and itaxprice=@itaxprice and isum=@isum and cbcloser=@cbcloser and cfree1=@cfree1 and cfree2=@cfree2 and cdefine22=@cdefine22 and cdefine23=@cdefine23 and cdefine24=@cdefine24 and cdefine25=@cdefine25 and cdefine26=@cdefine26 and cdefine27=@cdefine27 and cdefine28=@cdefine28 and cdefine29=@cdefine29 and cdefine30=@cdefine30 and cdefine31=@cdefine31 and cdefine32=@cdefine32 and cdefine33=@cdefine33 and cdefine34=@cdefine34 and cdefine35=@cdefine35 and cdefine36=@cdefine36 and cdefine37=@cdefine37 and itaxrate=@itaxrate and citemcode=@citemcode and citemname=@citemname and citem_class=@citem_class and citem_name=@citem_name and iposid=@iposid and fvalidquantity=@fvalidquantity and fvalidnum=@fvalidnum and fvalidinquan=@fvalidinquan and fvalidinnum=@fvalidinnum and fkpquantity=@fkpquantity and finvalidquantity=@finvalidquantity and finvalidnum=@finvalidnum and finvalidinquan=@finvalidinquan and fretquantity=@fretquantity and frefusequantity=@frefusequantity and frefusenum=@frefusenum and frealquantity=@frealquantity and frealnum=@frealnum and cfree3=@cfree3 and cfree4=@cfree4 and cfree5=@cfree5 and cfree6=@cfree6 and cfree7=@cfree7 and cfree8=@cfree8 and cfree9=@cfree9 and cfree10=@cfree10 and cinvdefine1=@cinvdefine1 and cinvdefine2=@cinvdefine2 and cinvdefine3=@cinvdefine3 and cinvdefine4=@cinvdefine4 and cinvdefine5=@cinvdefine5 and cinvdefine6=@cinvdefine6 and cinvdefine7=@cinvdefine7 and cinvdefine8=@cinvdefine8 and cinvdefine9=@cinvdefine9 and cinvdefine10=@cinvdefine10 and cinvdefine11=@cinvdefine11 and cinvdefine12=@cinvdefine12 and cinvdefine13=@cinvdefine13 and cinvdefine14=@cinvdefine14 and cinvdefine15=@cinvdefine15 and cinvdefine16=@cinvdefine16 and rejectsource=@rejectsource and bgsp=@bgsp and cinvauthid=@cinvauthid and btaxcost=@btaxcost and binspect=@binspect and contractrowguid=@contractrowguid and iinvmpcost=@iinvmpcost and irowno=@irowno and sotype=@sotype and csocode=@csocode and cdemandmemo=@cdemandmemo and iordertype=@iordertype and csoordercode=@csoordercode and iorderseq=@iorderseq and iorderdid=@iorderdid and ippartid=@ippartid and ipquantity=@ipquantity and iptoseq=@iptoseq and cveninvcode=@cveninvcode and cveninvname=@cveninvname and sodid=@sodid and cordercode=@cordercode and bexigency=@bexigency and contractcode=@contractcode and contractrowno=@contractrowno and fretnum=@fretnum and fsumrefusequantity=@fsumrefusequantity and fsumrefusenum=@fsumrefusenum and fdtquantity=@fdtquantity and finvalidinnum=@finvalidinnum and finspectquantity=@finspectquantity and finspectnum=@finspectnum and vouchstate=@vouchstate and fininquantity=@fininquantity and fininnum=@fininnum and dValidateDate=@dValidateDate and inspecexchrate=@inspecexchrate and irejectautoid=@irejectautoid and iexpiratdatecalcu=@iexpiratdatecalcu and cexpirationdate=@cexpirationdate and dexpirationdate=@dexpirationdate and carrivalcode=@carrivalcode and cbatchproperty1=@cbatchproperty1 and cbatchproperty2=@cbatchproperty2 and cbatchproperty3=@cbatchproperty3 and cbatchproperty4=@cbatchproperty4 and cbatchproperty5=@cbatchproperty5 and cbatchproperty6=@cbatchproperty6 and cbatchproperty7=@cbatchproperty7 and cbatchproperty8=@cbatchproperty8 and cbatchproperty9=@cbatchproperty9 and cbatchproperty10=@cbatchproperty10 and cupsocode=@cupsocode and ivouchrowno=@ivouchrowno and cbmemo=@cbmemo and cbsysbarcode=@cbsysbarcode and iproducttype=@iproducttype and cmaininvcode=@cmaininvcode and imainmodetailsid=@imainmodetailsid and isourcemocode=@isourcemocode and isourcemodetailsid=@isourcemodetailsid and freworkquantity=@freworkquantity and freworknum=@freworknum and fsumreworkquantity=@fsumreworkquantity and fsumreworknum=@fsumreworknum and planlotnumber=@planlotnumber and bgift=@bgift and dlineclosedate=@dlineclosedate and cfactorycode=@cfactorycode and cfactoryname=@cfactoryname ");

            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@cwhcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cwhname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@autoid", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal),
                    new SqlParameter("@binvbatch", SqlDbType.Bit,1),
                    new SqlParameter("@cbatch", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dvdate", SqlDbType.DateTime),
                    new SqlParameter("@dpdate", SqlDbType.DateTime),
                    new SqlParameter("@imassdate", SqlDbType.Int,4),
                    new SqlParameter("@cmassunit", SqlDbType.TinyInt),
                    new SqlParameter("@cgspstate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ioritaxcost", SqlDbType.Decimal),
                    new SqlParameter("@icorid", SqlDbType.Int,4),
                    new SqlParameter("@iquantity", SqlDbType.Decimal),
                    new SqlParameter("@inum", SqlDbType.Decimal),
                    new SqlParameter("@ioricost", SqlDbType.Decimal),
                    new SqlParameter("@iorimoney", SqlDbType.Money),
                    new SqlParameter("@ioritaxprice", SqlDbType.Money),
                    new SqlParameter("@iorisum", SqlDbType.Money),
                    new SqlParameter("@icost", SqlDbType.Decimal),
                    new SqlParameter("@imoney", SqlDbType.Money),
                    new SqlParameter("@itaxprice", SqlDbType.Money),
                    new SqlParameter("@isum", SqlDbType.Money),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine26", SqlDbType.Float),
                    new SqlParameter("@cdefine27", SqlDbType.Float),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iposid", SqlDbType.Int,4),
                    new SqlParameter("@fvalidquantity", SqlDbType.Decimal),
                    new SqlParameter("@fvalidnum", SqlDbType.Decimal),
                    new SqlParameter("@fvalidinquan", SqlDbType.Decimal),
                    new SqlParameter("@fvalidinnum", SqlDbType.Decimal),
                    new SqlParameter("@fkpquantity", SqlDbType.Decimal),
                    new SqlParameter("@finvalidquantity", SqlDbType.Decimal),
                    new SqlParameter("@finvalidnum", SqlDbType.Decimal),
                    new SqlParameter("@finvalidinquan", SqlDbType.Decimal),
                    new SqlParameter("@fretquantity", SqlDbType.Decimal),
                    new SqlParameter("@frefusequantity", SqlDbType.Decimal),
                    new SqlParameter("@frefusenum", SqlDbType.Decimal),
                    new SqlParameter("@frealquantity", SqlDbType.Decimal),
                    new SqlParameter("@frealnum", SqlDbType.Decimal),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@rejectsource", SqlDbType.Bit,1),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@binspect", SqlDbType.TinyInt),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cordercode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bexigency", SqlDbType.TinyInt),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,-1),
                    new SqlParameter("@fretnum", SqlDbType.Decimal),
                    new SqlParameter("@fsumrefusequantity", SqlDbType.Decimal),
                    new SqlParameter("@fsumrefusenum", SqlDbType.Decimal),
                    new SqlParameter("@fdtquantity", SqlDbType.Decimal),
                    new SqlParameter("@finvalidinnum", SqlDbType.Decimal),
                    new SqlParameter("@finspectquantity", SqlDbType.Decimal),
                    new SqlParameter("@finspectnum", SqlDbType.Decimal),
                    new SqlParameter("@vouchstate", SqlDbType.Int,4),
                    new SqlParameter("@fininquantity", SqlDbType.Decimal),
                    new SqlParameter("@fininnum", SqlDbType.Decimal),
                    new SqlParameter("@dValidateDate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@inspecexchrate", SqlDbType.Decimal),
                    new SqlParameter("@irejectautoid", SqlDbType.Int,4),
                    new SqlParameter("@iexpiratdatecalcu", SqlDbType.SmallInt),
                    new SqlParameter("@cexpirationdate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dexpirationdate", SqlDbType.DateTime),
                    new SqlParameter("@carrivalcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty1", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty2", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty3", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty4", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty5", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty10", SqlDbType.DateTime),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iproducttype", SqlDbType.TinyInt),
                    new SqlParameter("@cmaininvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@imainmodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@isourcemocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@isourcemodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@freworkquantity", SqlDbType.Decimal),
                    new SqlParameter("@freworknum", SqlDbType.Decimal),
                    new SqlParameter("@fsumreworkquantity", SqlDbType.Decimal),
                    new SqlParameter("@fsumreworknum", SqlDbType.Decimal),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bgift", SqlDbType.SmallInt),
                    new SqlParameter("@dlineclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,-1)};
            parameters[0].Value = id;
            parameters[1].Value = cwhcode;
            parameters[2].Value = cwhname;
            parameters[3].Value = autoid;
            parameters[4].Value = cinvcode;
            parameters[5].Value = cinvaddcode;
            parameters[6].Value = cinvname;
            parameters[7].Value = cinvstd;
            parameters[8].Value = cinvccode;
            parameters[9].Value = cunitid;
            parameters[10].Value = ccomunitcode;
            parameters[11].Value = cinvm_unit;
            parameters[12].Value = igrouptype;
            parameters[13].Value = cgroupcode;
            parameters[14].Value = cinva_unit;
            parameters[15].Value = bservice;
            parameters[16].Value = iinvexchrate;
            parameters[17].Value = binvbatch;
            parameters[18].Value = cbatch;
            parameters[19].Value = dvdate;
            parameters[20].Value = dpdate;
            parameters[21].Value = imassdate;
            parameters[22].Value = cmassunit;
            parameters[23].Value = cgspstate;
            parameters[24].Value = ccloser;
            parameters[25].Value = ioritaxcost;
            parameters[26].Value = icorid;
            parameters[27].Value = iquantity;
            parameters[28].Value = inum;
            parameters[29].Value = ioricost;
            parameters[30].Value = iorimoney;
            parameters[31].Value = ioritaxprice;
            parameters[32].Value = iorisum;
            parameters[33].Value = icost;
            parameters[34].Value = imoney;
            parameters[35].Value = itaxprice;
            parameters[36].Value = isum;
            parameters[37].Value = cbcloser;
            parameters[38].Value = cfree1;
            parameters[39].Value = cfree2;
            parameters[40].Value = cdefine22;
            parameters[41].Value = cdefine23;
            parameters[42].Value = cdefine24;
            parameters[43].Value = cdefine25;
            parameters[44].Value = cdefine26;
            parameters[45].Value = cdefine27;
            parameters[46].Value = cdefine28;
            parameters[47].Value = cdefine29;
            parameters[48].Value = cdefine30;
            parameters[49].Value = cdefine31;
            parameters[50].Value = cdefine32;
            parameters[51].Value = cdefine33;
            parameters[52].Value = cdefine34;
            parameters[53].Value = cdefine35;
            parameters[54].Value = cdefine36;
            parameters[55].Value = cdefine37;
            parameters[56].Value = itaxrate;
            parameters[57].Value = citemcode;
            parameters[58].Value = citemname;
            parameters[59].Value = citem_class;
            parameters[60].Value = citem_name;
            parameters[61].Value = iposid;
            parameters[62].Value = fvalidquantity;
            parameters[63].Value = fvalidnum;
            parameters[64].Value = fvalidinquan;
            parameters[65].Value = fvalidinnum;
            parameters[66].Value = fkpquantity;
            parameters[67].Value = finvalidquantity;
            parameters[68].Value = finvalidnum;
            parameters[69].Value = finvalidinquan;
            parameters[70].Value = fretquantity;
            parameters[71].Value = frefusequantity;
            parameters[72].Value = frefusenum;
            parameters[73].Value = frealquantity;
            parameters[74].Value = frealnum;
            parameters[75].Value = cfree3;
            parameters[76].Value = cfree4;
            parameters[77].Value = cfree5;
            parameters[78].Value = cfree6;
            parameters[79].Value = cfree7;
            parameters[80].Value = cfree8;
            parameters[81].Value = cfree9;
            parameters[82].Value = cfree10;
            parameters[83].Value = cinvdefine1;
            parameters[84].Value = cinvdefine2;
            parameters[85].Value = cinvdefine3;
            parameters[86].Value = cinvdefine4;
            parameters[87].Value = cinvdefine5;
            parameters[88].Value = cinvdefine6;
            parameters[89].Value = cinvdefine7;
            parameters[90].Value = cinvdefine8;
            parameters[91].Value = cinvdefine9;
            parameters[92].Value = cinvdefine10;
            parameters[93].Value = cinvdefine11;
            parameters[94].Value = cinvdefine12;
            parameters[95].Value = cinvdefine13;
            parameters[96].Value = cinvdefine14;
            parameters[97].Value = cinvdefine15;
            parameters[98].Value = cinvdefine16;
            parameters[99].Value = rejectsource;
            parameters[100].Value = bgsp;
            parameters[101].Value = cinvauthid;
            parameters[102].Value = btaxcost;
            parameters[103].Value = binspect;
            parameters[104].Value = contractrowguid;
            parameters[105].Value = iinvmpcost;
            parameters[106].Value = irowno;
            parameters[107].Value = sotype;
            parameters[108].Value = csocode;
            parameters[109].Value = cdemandmemo;
            parameters[110].Value = iordertype;
            parameters[111].Value = csoordercode;
            parameters[112].Value = iorderseq;
            parameters[113].Value = iorderdid;
            parameters[114].Value = ippartid;
            parameters[115].Value = ipquantity;
            parameters[116].Value = iptoseq;
            parameters[117].Value = cveninvcode;
            parameters[118].Value = cveninvname;
            parameters[119].Value = sodid;
            parameters[120].Value = cordercode;
            parameters[121].Value = bexigency;
            parameters[122].Value = contractcode;
            parameters[123].Value = contractrowno;
            parameters[124].Value = fretnum;
            parameters[125].Value = fsumrefusequantity;
            parameters[126].Value = fsumrefusenum;
            parameters[127].Value = fdtquantity;
            parameters[128].Value = finvalidinnum;
            parameters[129].Value = finspectquantity;
            parameters[130].Value = finspectnum;
            parameters[131].Value = vouchstate;
            parameters[132].Value = fininquantity;
            parameters[133].Value = fininnum;
            parameters[134].Value = dValidateDate;
            parameters[135].Value = inspecexchrate;
            parameters[136].Value = irejectautoid;
            parameters[137].Value = iexpiratdatecalcu;
            parameters[138].Value = cexpirationdate;
            parameters[139].Value = dexpirationdate;
            parameters[140].Value = carrivalcode;
            parameters[141].Value = cbatchproperty1;
            parameters[142].Value = cbatchproperty2;
            parameters[143].Value = cbatchproperty3;
            parameters[144].Value = cbatchproperty4;
            parameters[145].Value = cbatchproperty5;
            parameters[146].Value = cbatchproperty6;
            parameters[147].Value = cbatchproperty7;
            parameters[148].Value = cbatchproperty8;
            parameters[149].Value = cbatchproperty9;
            parameters[150].Value = cbatchproperty10;
            parameters[151].Value = cupsocode;
            parameters[152].Value = ivouchrowno;
            parameters[153].Value = cbmemo;
            parameters[154].Value = cbsysbarcode;
            parameters[155].Value = iproducttype;
            parameters[156].Value = cmaininvcode;
            parameters[157].Value = imainmodetailsid;
            parameters[158].Value = isourcemocode;
            parameters[159].Value = isourcemodetailsid;
            parameters[160].Value = freworkquantity;
            parameters[161].Value = freworknum;
            parameters[162].Value = fsumreworkquantity;
            parameters[163].Value = fsumreworknum;
            parameters[164].Value = planlotnumber;
            parameters[165].Value = bgift;
            parameters[166].Value = dlineclosedate;
            parameters[167].Value = cfactorycode;
            parameters[168].Value = cfactoryname;

            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }


        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(string tablename)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into " + tablename + "(");
            strSql.Append("id,cwhcode,cwhname,autoid,cinvcode,cinvaddcode,cinvname,cinvstd,cinvccode,cunitid,ccomunitcode,cinvm_unit,igrouptype,cgroupcode,cinva_unit,bservice,iinvexchrate,binvbatch,cbatch,dvdate,dpdate,imassdate,cmassunit,cgspstate,ccloser,ioritaxcost,icorid,iquantity,inum,ioricost,iorimoney,ioritaxprice,iorisum,icost,imoney,itaxprice,isum,cbcloser,cfree1,cfree2,cdefine22,cdefine23,cdefine24,cdefine25,cdefine26,cdefine27,cdefine28,cdefine29,cdefine30,cdefine31,cdefine32,cdefine33,cdefine34,cdefine35,cdefine36,cdefine37,itaxrate,citemcode,citemname,citem_class,citem_name,iposid,fvalidquantity,fvalidnum,fvalidinquan,fvalidinnum,fkpquantity,finvalidquantity,finvalidnum,finvalidinquan,fretquantity,frefusequantity,frefusenum,frealquantity,frealnum,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10,cinvdefine1,cinvdefine2,cinvdefine3,cinvdefine4,cinvdefine5,cinvdefine6,cinvdefine7,cinvdefine8,cinvdefine9,cinvdefine10,cinvdefine11,cinvdefine12,cinvdefine13,cinvdefine14,cinvdefine15,cinvdefine16,rejectsource,bgsp,cinvauthid,btaxcost,binspect,contractrowguid,iinvmpcost,irowno,sotype,csocode,cdemandmemo,iordertype,csoordercode,iorderseq,iorderdid,ippartid,ipquantity,iptoseq,cveninvcode,cveninvname,sodid,cordercode,bexigency,contractcode,contractrowno,fretnum,fsumrefusequantity,fsumrefusenum,fdtquantity,finvalidinnum,finspectquantity,finspectnum,vouchstate,fininquantity,fininnum,dValidateDate,inspecexchrate,irejectautoid,iexpiratdatecalcu,cexpirationdate,dexpirationdate,carrivalcode,cbatchproperty1,cbatchproperty2,cbatchproperty3,cbatchproperty4,cbatchproperty5,cbatchproperty6,cbatchproperty7,cbatchproperty8,cbatchproperty9,cbatchproperty10,cupsocode,ivouchrowno,cbmemo,cbsysbarcode,iproducttype,cmaininvcode,imainmodetailsid,isourcemocode,isourcemodetailsid,freworkquantity,freworknum,fsumreworkquantity,fsumreworknum,planlotnumber,bgift,dlineclosedate,cfactorycode,cfactoryname)");
            strSql.Append(" values (");
            strSql.Append("@id,@cwhcode,@cwhname,@autoid,@cinvcode,@cinvaddcode,@cinvname,@cinvstd,@cinvccode,@cunitid,@ccomunitcode,@cinvm_unit,@igrouptype,@cgroupcode,@cinva_unit,@bservice,@iinvexchrate,@binvbatch,@cbatch,@dvdate,@dpdate,@imassdate,@cmassunit,@cgspstate,@ccloser,@ioritaxcost,@icorid,@iquantity,@inum,@ioricost,@iorimoney,@ioritaxprice,@iorisum,@icost,@imoney,@itaxprice,@isum,@cbcloser,@cfree1,@cfree2,@cdefine22,@cdefine23,@cdefine24,@cdefine25,@cdefine26,@cdefine27,@cdefine28,@cdefine29,@cdefine30,@cdefine31,@cdefine32,@cdefine33,@cdefine34,@cdefine35,@cdefine36,@cdefine37,@itaxrate,@citemcode,@citemname,@citem_class,@citem_name,@iposid,@fvalidquantity,@fvalidnum,@fvalidinquan,@fvalidinnum,@fkpquantity,@finvalidquantity,@finvalidnum,@finvalidinquan,@fretquantity,@frefusequantity,@frefusenum,@frealquantity,@frealnum,@cfree3,@cfree4,@cfree5,@cfree6,@cfree7,@cfree8,@cfree9,@cfree10,@cinvdefine1,@cinvdefine2,@cinvdefine3,@cinvdefine4,@cinvdefine5,@cinvdefine6,@cinvdefine7,@cinvdefine8,@cinvdefine9,@cinvdefine10,@cinvdefine11,@cinvdefine12,@cinvdefine13,@cinvdefine14,@cinvdefine15,@cinvdefine16,@rejectsource,@bgsp,@cinvauthid,@btaxcost,@binspect,@contractrowguid,@iinvmpcost,@irowno,@sotype,@csocode,@cdemandmemo,@iordertype,@csoordercode,@iorderseq,@iorderdid,@ippartid,@ipquantity,@iptoseq,@cveninvcode,@cveninvname,@sodid,@cordercode,@bexigency,@contractcode,@contractrowno,@fretnum,@fsumrefusequantity,@fsumrefusenum,@fdtquantity,@finvalidinnum,@finspectquantity,@finspectnum,@vouchstate,@fininquantity,@fininnum,@dValidateDate,@inspecexchrate,@irejectautoid,@iexpiratdatecalcu,@cexpirationdate,@dexpirationdate,@carrivalcode,@cbatchproperty1,@cbatchproperty2,@cbatchproperty3,@cbatchproperty4,@cbatchproperty5,@cbatchproperty6,@cbatchproperty7,@cbatchproperty8,@cbatchproperty9,@cbatchproperty10,@cupsocode,@ivouchrowno,@cbmemo,@cbsysbarcode,@iproducttype,@cmaininvcode,@imainmodetailsid,@isourcemocode,@isourcemodetailsid,@freworkquantity,@freworknum,@fsumreworkquantity,@fsumreworknum,@planlotnumber,@bgift,@dlineclosedate,@cfactorycode,@cfactoryname)");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@cwhcode", SqlDbType.NVarChar,10),
                    new SqlParameter("@cwhname", SqlDbType.NVarChar,20),
                    new SqlParameter("@autoid", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,12),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,50),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,20),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,20),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal,17),
                    new SqlParameter("@binvbatch", SqlDbType.Bit,1),
                    new SqlParameter("@cbatch", SqlDbType.NVarChar,60),
                    new SqlParameter("@dvdate", SqlDbType.DateTime),
                    new SqlParameter("@dpdate", SqlDbType.DateTime),
                    new SqlParameter("@imassdate", SqlDbType.Int,4),
                    new SqlParameter("@cmassunit", SqlDbType.TinyInt,1),
                    new SqlParameter("@cgspstate", SqlDbType.NVarChar,20),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@ioritaxcost", SqlDbType.Decimal,13),
                    new SqlParameter("@icorid", SqlDbType.Int,4),
                    new SqlParameter("@iquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@inum", SqlDbType.Decimal,13),
                    new SqlParameter("@ioricost", SqlDbType.Decimal,13),
                    new SqlParameter("@iorimoney", SqlDbType.Money,8),
                    new SqlParameter("@ioritaxprice", SqlDbType.Money,8),
                    new SqlParameter("@iorisum", SqlDbType.Money,8),
                    new SqlParameter("@icost", SqlDbType.Decimal,13),
                    new SqlParameter("@imoney", SqlDbType.Money,8),
                    new SqlParameter("@itaxprice", SqlDbType.Money,8),
                    new SqlParameter("@isum", SqlDbType.Money,8),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine26", SqlDbType.Float,8),
                    new SqlParameter("@cdefine27", SqlDbType.Float,8),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal,13),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,255),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,2),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,50),
                    new SqlParameter("@iposid", SqlDbType.Int,4),
                    new SqlParameter("@fvalidquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fvalidnum", SqlDbType.Decimal,13),
                    new SqlParameter("@fvalidinquan", SqlDbType.Decimal,13),
                    new SqlParameter("@fvalidinnum", SqlDbType.Decimal,17),
                    new SqlParameter("@fkpquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@finvalidquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@finvalidnum", SqlDbType.Decimal,13),
                    new SqlParameter("@finvalidinquan", SqlDbType.Decimal,13),
                    new SqlParameter("@fretquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@frefusequantity", SqlDbType.Decimal,13),
                    new SqlParameter("@frefusenum", SqlDbType.Decimal,17),
                    new SqlParameter("@frealquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@frealnum", SqlDbType.Decimal,13),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float,8),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float,8),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@rejectsource", SqlDbType.Bit,1),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt,1),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@binspect", SqlDbType.TinyInt,1),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier,16),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal,13),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt,1),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,50),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt,1),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,50),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,40),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,100),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,50),
                    new SqlParameter("@cordercode", SqlDbType.NVarChar,30),
                    new SqlParameter("@bexigency", SqlDbType.TinyInt,1),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,128),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,150),
                    new SqlParameter("@fretnum", SqlDbType.Decimal,13),
                    new SqlParameter("@fsumrefusequantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fsumrefusenum", SqlDbType.Decimal,17),
                    new SqlParameter("@fdtquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@finvalidinnum", SqlDbType.Decimal,13),
                    new SqlParameter("@finspectquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@finspectnum", SqlDbType.Decimal,13),
                    new SqlParameter("@vouchstate", SqlDbType.Int,4),
                    new SqlParameter("@fininquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fininnum", SqlDbType.Decimal,17),
                    new SqlParameter("@dValidateDate", SqlDbType.NVarChar,7),
                    new SqlParameter("@inspecexchrate", SqlDbType.Decimal,17),
                    new SqlParameter("@irejectautoid", SqlDbType.Int,4),
                    new SqlParameter("@iexpiratdatecalcu", SqlDbType.SmallInt,2),
                    new SqlParameter("@cexpirationdate", SqlDbType.NVarChar,20),
                    new SqlParameter("@dexpirationdate", SqlDbType.DateTime),
                    new SqlParameter("@carrivalcode", SqlDbType.NVarChar,80),
                    new SqlParameter("@cbatchproperty1", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty2", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty3", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty4", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty5", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty6", SqlDbType.NVarChar,120),
                    new SqlParameter("@cbatchproperty7", SqlDbType.NVarChar,120),
                    new SqlParameter("@cbatchproperty8", SqlDbType.NVarChar,120),
                    new SqlParameter("@cbatchproperty9", SqlDbType.NVarChar,120),
                    new SqlParameter("@cbatchproperty10", SqlDbType.DateTime),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,120),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,80),
                    new SqlParameter("@iproducttype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cmaininvcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@imainmodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@isourcemocode", SqlDbType.NVarChar,60),
                    new SqlParameter("@isourcemodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@freworkquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@freworknum", SqlDbType.Decimal,13),
                    new SqlParameter("@fsumreworkquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fsumreworknum", SqlDbType.Decimal,13),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,40),
                    new SqlParameter("@bgift", SqlDbType.SmallInt,2),
                    new SqlParameter("@dlineclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,50),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,255)};
            parameters[0].Value = id;
            parameters[1].Value = cwhcode;
            parameters[2].Value = cwhname;
            parameters[3].Value = autoid;
            parameters[4].Value = cinvcode;
            parameters[5].Value = cinvaddcode;
            parameters[6].Value = cinvname;
            parameters[7].Value = cinvstd;
            parameters[8].Value = cinvccode;
            parameters[9].Value = cunitid;
            parameters[10].Value = ccomunitcode;
            parameters[11].Value = cinvm_unit;
            parameters[12].Value = igrouptype;
            parameters[13].Value = cgroupcode;
            parameters[14].Value = cinva_unit;
            parameters[15].Value = bservice;
            parameters[16].Value = iinvexchrate;
            parameters[17].Value = binvbatch;
            parameters[18].Value = cbatch;
            parameters[19].Value = dvdate;
            parameters[20].Value = dpdate;
            parameters[21].Value = imassdate;
            parameters[22].Value = cmassunit;
            parameters[23].Value = cgspstate;
            parameters[24].Value = ccloser;
            parameters[25].Value = ioritaxcost;
            parameters[26].Value = icorid;
            parameters[27].Value = iquantity;
            parameters[28].Value = inum;
            parameters[29].Value = ioricost;
            parameters[30].Value = iorimoney;
            parameters[31].Value = ioritaxprice;
            parameters[32].Value = iorisum;
            parameters[33].Value = icost;
            parameters[34].Value = imoney;
            parameters[35].Value = itaxprice;
            parameters[36].Value = isum;
            parameters[37].Value = cbcloser;
            parameters[38].Value = cfree1;
            parameters[39].Value = cfree2;
            parameters[40].Value = cdefine22;
            parameters[41].Value = cdefine23;
            parameters[42].Value = cdefine24;
            parameters[43].Value = cdefine25;
            parameters[44].Value = cdefine26;
            parameters[45].Value = cdefine27;
            parameters[46].Value = cdefine28;
            parameters[47].Value = cdefine29;
            parameters[48].Value = cdefine30;
            parameters[49].Value = cdefine31;
            parameters[50].Value = cdefine32;
            parameters[51].Value = cdefine33;
            parameters[52].Value = cdefine34;
            parameters[53].Value = cdefine35;
            parameters[54].Value = cdefine36;
            parameters[55].Value = cdefine37;
            parameters[56].Value = itaxrate;
            parameters[57].Value = citemcode;
            parameters[58].Value = citemname;
            parameters[59].Value = citem_class;
            parameters[60].Value = citem_name;
            parameters[61].Value = iposid;
            parameters[62].Value = fvalidquantity;
            parameters[63].Value = fvalidnum;
            parameters[64].Value = fvalidinquan;
            parameters[65].Value = fvalidinnum;
            parameters[66].Value = fkpquantity;
            parameters[67].Value = finvalidquantity;
            parameters[68].Value = finvalidnum;
            parameters[69].Value = finvalidinquan;
            parameters[70].Value = fretquantity;
            parameters[71].Value = frefusequantity;
            parameters[72].Value = frefusenum;
            parameters[73].Value = frealquantity;
            parameters[74].Value = frealnum;
            parameters[75].Value = cfree3;
            parameters[76].Value = cfree4;
            parameters[77].Value = cfree5;
            parameters[78].Value = cfree6;
            parameters[79].Value = cfree7;
            parameters[80].Value = cfree8;
            parameters[81].Value = cfree9;
            parameters[82].Value = cfree10;
            parameters[83].Value = cinvdefine1;
            parameters[84].Value = cinvdefine2;
            parameters[85].Value = cinvdefine3;
            parameters[86].Value = cinvdefine4;
            parameters[87].Value = cinvdefine5;
            parameters[88].Value = cinvdefine6;
            parameters[89].Value = cinvdefine7;
            parameters[90].Value = cinvdefine8;
            parameters[91].Value = cinvdefine9;
            parameters[92].Value = cinvdefine10;
            parameters[93].Value = cinvdefine11;
            parameters[94].Value = cinvdefine12;
            parameters[95].Value = cinvdefine13;
            parameters[96].Value = cinvdefine14;
            parameters[97].Value = cinvdefine15;
            parameters[98].Value = cinvdefine16;
            parameters[99].Value = rejectsource;
            parameters[100].Value = bgsp;
            parameters[101].Value = cinvauthid;
            parameters[102].Value = btaxcost;
            parameters[103].Value = binspect;
            parameters[104].Value = contractrowguid;
            parameters[105].Value = iinvmpcost;
            parameters[106].Value = irowno;
            parameters[107].Value = sotype;
            parameters[108].Value = csocode;
            parameters[109].Value = cdemandmemo;
            parameters[110].Value = iordertype;
            parameters[111].Value = csoordercode;
            parameters[112].Value = iorderseq;
            parameters[113].Value = iorderdid;
            parameters[114].Value = ippartid;
            parameters[115].Value = ipquantity;
            parameters[116].Value = iptoseq;
            parameters[117].Value = cveninvcode;
            parameters[118].Value = cveninvname;
            parameters[119].Value = sodid;
            parameters[120].Value = cordercode;
            parameters[121].Value = bexigency;
            parameters[122].Value = contractcode;
            parameters[123].Value = contractrowno;
            parameters[124].Value = fretnum;
            parameters[125].Value = fsumrefusequantity;
            parameters[126].Value = fsumrefusenum;
            parameters[127].Value = fdtquantity;
            parameters[128].Value = finvalidinnum;
            parameters[129].Value = finspectquantity;
            parameters[130].Value = finspectnum;
            parameters[131].Value = vouchstate;
            parameters[132].Value = fininquantity;
            parameters[133].Value = fininnum;
            parameters[134].Value = dValidateDate;
            parameters[135].Value = inspecexchrate;
            parameters[136].Value = irejectautoid;
            parameters[137].Value = iexpiratdatecalcu;
            parameters[138].Value = cexpirationdate;
            parameters[139].Value = dexpirationdate;
            parameters[140].Value = carrivalcode;
            parameters[141].Value = cbatchproperty1;
            parameters[142].Value = cbatchproperty2;
            parameters[143].Value = cbatchproperty3;
            parameters[144].Value = cbatchproperty4;
            parameters[145].Value = cbatchproperty5;
            parameters[146].Value = cbatchproperty6;
            parameters[147].Value = cbatchproperty7;
            parameters[148].Value = cbatchproperty8;
            parameters[149].Value = cbatchproperty9;
            parameters[150].Value = cbatchproperty10;
            parameters[151].Value = cupsocode;
            parameters[152].Value = ivouchrowno;
            parameters[153].Value = cbmemo;
            parameters[154].Value = cbsysbarcode;
            parameters[155].Value = iproducttype;
            parameters[156].Value = cmaininvcode;
            parameters[157].Value = imainmodetailsid;
            parameters[158].Value = isourcemocode;
            parameters[159].Value = isourcemodetailsid;
            parameters[160].Value = freworkquantity;
            parameters[161].Value = freworknum;
            parameters[162].Value = fsumreworkquantity;
            parameters[163].Value = fsumreworknum;
            parameters[164].Value = planlotnumber;
            parameters[165].Value = bgift;
            parameters[166].Value = dlineclosedate;
            parameters[167].Value = cfactorycode;
            parameters[168].Value = cfactoryname;

           return  DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update [pu_arrbody] set ");
            strSql.Append("id=@id,");
            strSql.Append("cwhcode=@cwhcode,");
            strSql.Append("cwhname=@cwhname,");
            strSql.Append("autoid=@autoid,");
            strSql.Append("cinvcode=@cinvcode,");
            strSql.Append("cinvaddcode=@cinvaddcode,");
            strSql.Append("cinvname=@cinvname,");
            strSql.Append("cinvstd=@cinvstd,");
            strSql.Append("cinvccode=@cinvccode,");
            strSql.Append("cunitid=@cunitid,");
            strSql.Append("ccomunitcode=@ccomunitcode,");
            strSql.Append("cinvm_unit=@cinvm_unit,");
            strSql.Append("igrouptype=@igrouptype,");
            strSql.Append("cgroupcode=@cgroupcode,");
            strSql.Append("cinva_unit=@cinva_unit,");
            strSql.Append("bservice=@bservice,");
            strSql.Append("iinvexchrate=@iinvexchrate,");
            strSql.Append("binvbatch=@binvbatch,");
            strSql.Append("cbatch=@cbatch,");
            strSql.Append("dvdate=@dvdate,");
            strSql.Append("dpdate=@dpdate,");
            strSql.Append("imassdate=@imassdate,");
            strSql.Append("cmassunit=@cmassunit,");
            strSql.Append("cgspstate=@cgspstate,");
            strSql.Append("ccloser=@ccloser,");
            strSql.Append("ioritaxcost=@ioritaxcost,");
            strSql.Append("icorid=@icorid,");
            strSql.Append("iquantity=@iquantity,");
            strSql.Append("inum=@inum,");
            strSql.Append("ioricost=@ioricost,");
            strSql.Append("iorimoney=@iorimoney,");
            strSql.Append("ioritaxprice=@ioritaxprice,");
            strSql.Append("iorisum=@iorisum,");
            strSql.Append("icost=@icost,");
            strSql.Append("imoney=@imoney,");
            strSql.Append("itaxprice=@itaxprice,");
            strSql.Append("isum=@isum,");
            strSql.Append("cbcloser=@cbcloser,");
            strSql.Append("cfree1=@cfree1,");
            strSql.Append("cfree2=@cfree2,");
            strSql.Append("cdefine22=@cdefine22,");
            strSql.Append("cdefine23=@cdefine23,");
            strSql.Append("cdefine24=@cdefine24,");
            strSql.Append("cdefine25=@cdefine25,");
            strSql.Append("cdefine26=@cdefine26,");
            strSql.Append("cdefine27=@cdefine27,");
            strSql.Append("cdefine28=@cdefine28,");
            strSql.Append("cdefine29=@cdefine29,");
            strSql.Append("cdefine30=@cdefine30,");
            strSql.Append("cdefine31=@cdefine31,");
            strSql.Append("cdefine32=@cdefine32,");
            strSql.Append("cdefine33=@cdefine33,");
            strSql.Append("cdefine34=@cdefine34,");
            strSql.Append("cdefine35=@cdefine35,");
            strSql.Append("cdefine36=@cdefine36,");
            strSql.Append("cdefine37=@cdefine37,");
            strSql.Append("itaxrate=@itaxrate,");
            strSql.Append("citemcode=@citemcode,");
            strSql.Append("citemname=@citemname,");
            strSql.Append("citem_class=@citem_class,");
            strSql.Append("citem_name=@citem_name,");
            strSql.Append("iposid=@iposid,");
            strSql.Append("fvalidquantity=@fvalidquantity,");
            strSql.Append("fvalidnum=@fvalidnum,");
            strSql.Append("fvalidinquan=@fvalidinquan,");
            strSql.Append("fvalidinnum=@fvalidinnum,");
            strSql.Append("fkpquantity=@fkpquantity,");
            strSql.Append("finvalidquantity=@finvalidquantity,");
            strSql.Append("finvalidnum=@finvalidnum,");
            strSql.Append("finvalidinquan=@finvalidinquan,");
            strSql.Append("fretquantity=@fretquantity,");
            strSql.Append("frefusequantity=@frefusequantity,");
            strSql.Append("frefusenum=@frefusenum,");
            strSql.Append("frealquantity=@frealquantity,");
            strSql.Append("frealnum=@frealnum,");
            strSql.Append("cfree3=@cfree3,");
            strSql.Append("cfree4=@cfree4,");
            strSql.Append("cfree5=@cfree5,");
            strSql.Append("cfree6=@cfree6,");
            strSql.Append("cfree7=@cfree7,");
            strSql.Append("cfree8=@cfree8,");
            strSql.Append("cfree9=@cfree9,");
            strSql.Append("cfree10=@cfree10,");
            strSql.Append("cinvdefine1=@cinvdefine1,");
            strSql.Append("cinvdefine2=@cinvdefine2,");
            strSql.Append("cinvdefine3=@cinvdefine3,");
            strSql.Append("cinvdefine4=@cinvdefine4,");
            strSql.Append("cinvdefine5=@cinvdefine5,");
            strSql.Append("cinvdefine6=@cinvdefine6,");
            strSql.Append("cinvdefine7=@cinvdefine7,");
            strSql.Append("cinvdefine8=@cinvdefine8,");
            strSql.Append("cinvdefine9=@cinvdefine9,");
            strSql.Append("cinvdefine10=@cinvdefine10,");
            strSql.Append("cinvdefine11=@cinvdefine11,");
            strSql.Append("cinvdefine12=@cinvdefine12,");
            strSql.Append("cinvdefine13=@cinvdefine13,");
            strSql.Append("cinvdefine14=@cinvdefine14,");
            strSql.Append("cinvdefine15=@cinvdefine15,");
            strSql.Append("cinvdefine16=@cinvdefine16,");
            strSql.Append("rejectsource=@rejectsource,");
            strSql.Append("bgsp=@bgsp,");
            strSql.Append("cinvauthid=@cinvauthid,");
            strSql.Append("btaxcost=@btaxcost,");
            strSql.Append("binspect=@binspect,");
            strSql.Append("contractrowguid=@contractrowguid,");
            strSql.Append("iinvmpcost=@iinvmpcost,");
            strSql.Append("irowno=@irowno,");
            strSql.Append("sotype=@sotype,");
            strSql.Append("csocode=@csocode,");
            strSql.Append("cdemandmemo=@cdemandmemo,");
            strSql.Append("iordertype=@iordertype,");
            strSql.Append("csoordercode=@csoordercode,");
            strSql.Append("iorderseq=@iorderseq,");
            strSql.Append("iorderdid=@iorderdid,");
            strSql.Append("ippartid=@ippartid,");
            strSql.Append("ipquantity=@ipquantity,");
            strSql.Append("iptoseq=@iptoseq,");
            strSql.Append("cveninvcode=@cveninvcode,");
            strSql.Append("cveninvname=@cveninvname,");
            strSql.Append("sodid=@sodid,");
            strSql.Append("cordercode=@cordercode,");
            strSql.Append("bexigency=@bexigency,");
            strSql.Append("contractcode=@contractcode,");
            strSql.Append("contractrowno=@contractrowno,");
            strSql.Append("fretnum=@fretnum,");
            strSql.Append("fsumrefusequantity=@fsumrefusequantity,");
            strSql.Append("fsumrefusenum=@fsumrefusenum,");
            strSql.Append("fdtquantity=@fdtquantity,");
            strSql.Append("finvalidinnum=@finvalidinnum,");
            strSql.Append("finspectquantity=@finspectquantity,");
            strSql.Append("finspectnum=@finspectnum,");
            strSql.Append("vouchstate=@vouchstate,");
            strSql.Append("fininquantity=@fininquantity,");
            strSql.Append("fininnum=@fininnum,");
            strSql.Append("dValidateDate=@dValidateDate,");
            strSql.Append("inspecexchrate=@inspecexchrate,");
            strSql.Append("irejectautoid=@irejectautoid,");
            strSql.Append("iexpiratdatecalcu=@iexpiratdatecalcu,");
            strSql.Append("cexpirationdate=@cexpirationdate,");
            strSql.Append("dexpirationdate=@dexpirationdate,");
            strSql.Append("carrivalcode=@carrivalcode,");
            strSql.Append("cbatchproperty1=@cbatchproperty1,");
            strSql.Append("cbatchproperty2=@cbatchproperty2,");
            strSql.Append("cbatchproperty3=@cbatchproperty3,");
            strSql.Append("cbatchproperty4=@cbatchproperty4,");
            strSql.Append("cbatchproperty5=@cbatchproperty5,");
            strSql.Append("cbatchproperty6=@cbatchproperty6,");
            strSql.Append("cbatchproperty7=@cbatchproperty7,");
            strSql.Append("cbatchproperty8=@cbatchproperty8,");
            strSql.Append("cbatchproperty9=@cbatchproperty9,");
            strSql.Append("cbatchproperty10=@cbatchproperty10,");
            strSql.Append("cupsocode=@cupsocode,");
            strSql.Append("ivouchrowno=@ivouchrowno,");
            strSql.Append("cbmemo=@cbmemo,");
            strSql.Append("cbsysbarcode=@cbsysbarcode,");
            strSql.Append("iproducttype=@iproducttype,");
            strSql.Append("cmaininvcode=@cmaininvcode,");
            strSql.Append("imainmodetailsid=@imainmodetailsid,");
            strSql.Append("isourcemocode=@isourcemocode,");
            strSql.Append("isourcemodetailsid=@isourcemodetailsid,");
            strSql.Append("freworkquantity=@freworkquantity,");
            strSql.Append("freworknum=@freworknum,");
            strSql.Append("fsumreworkquantity=@fsumreworkquantity,");
            strSql.Append("fsumreworknum=@fsumreworknum,");
            strSql.Append("planlotnumber=@planlotnumber,");
            strSql.Append("bgift=@bgift,");
            strSql.Append("dlineclosedate=@dlineclosedate,");
            strSql.Append("cfactorycode=@cfactorycode,");
            strSql.Append("cfactoryname=@cfactoryname");
            strSql.Append(" where id=@id and cwhcode=@cwhcode and cwhname=@cwhname and autoid=@autoid and cinvcode=@cinvcode and cinvaddcode=@cinvaddcode and cinvname=@cinvname and cinvstd=@cinvstd and cinvccode=@cinvccode and cunitid=@cunitid and ccomunitcode=@ccomunitcode and cinvm_unit=@cinvm_unit and igrouptype=@igrouptype and cgroupcode=@cgroupcode and cinva_unit=@cinva_unit and bservice=@bservice and iinvexchrate=@iinvexchrate and binvbatch=@binvbatch and cbatch=@cbatch and dvdate=@dvdate and dpdate=@dpdate and imassdate=@imassdate and cmassunit=@cmassunit and cgspstate=@cgspstate and ccloser=@ccloser and ioritaxcost=@ioritaxcost and icorid=@icorid and iquantity=@iquantity and inum=@inum and ioricost=@ioricost and iorimoney=@iorimoney and ioritaxprice=@ioritaxprice and iorisum=@iorisum and icost=@icost and imoney=@imoney and itaxprice=@itaxprice and isum=@isum and cbcloser=@cbcloser and cfree1=@cfree1 and cfree2=@cfree2 and cdefine22=@cdefine22 and cdefine23=@cdefine23 and cdefine24=@cdefine24 and cdefine25=@cdefine25 and cdefine26=@cdefine26 and cdefine27=@cdefine27 and cdefine28=@cdefine28 and cdefine29=@cdefine29 and cdefine30=@cdefine30 and cdefine31=@cdefine31 and cdefine32=@cdefine32 and cdefine33=@cdefine33 and cdefine34=@cdefine34 and cdefine35=@cdefine35 and cdefine36=@cdefine36 and cdefine37=@cdefine37 and itaxrate=@itaxrate and citemcode=@citemcode and citemname=@citemname and citem_class=@citem_class and citem_name=@citem_name and iposid=@iposid and fvalidquantity=@fvalidquantity and fvalidnum=@fvalidnum and fvalidinquan=@fvalidinquan and fvalidinnum=@fvalidinnum and fkpquantity=@fkpquantity and finvalidquantity=@finvalidquantity and finvalidnum=@finvalidnum and finvalidinquan=@finvalidinquan and fretquantity=@fretquantity and frefusequantity=@frefusequantity and frefusenum=@frefusenum and frealquantity=@frealquantity and frealnum=@frealnum and cfree3=@cfree3 and cfree4=@cfree4 and cfree5=@cfree5 and cfree6=@cfree6 and cfree7=@cfree7 and cfree8=@cfree8 and cfree9=@cfree9 and cfree10=@cfree10 and cinvdefine1=@cinvdefine1 and cinvdefine2=@cinvdefine2 and cinvdefine3=@cinvdefine3 and cinvdefine4=@cinvdefine4 and cinvdefine5=@cinvdefine5 and cinvdefine6=@cinvdefine6 and cinvdefine7=@cinvdefine7 and cinvdefine8=@cinvdefine8 and cinvdefine9=@cinvdefine9 and cinvdefine10=@cinvdefine10 and cinvdefine11=@cinvdefine11 and cinvdefine12=@cinvdefine12 and cinvdefine13=@cinvdefine13 and cinvdefine14=@cinvdefine14 and cinvdefine15=@cinvdefine15 and cinvdefine16=@cinvdefine16 and rejectsource=@rejectsource and bgsp=@bgsp and cinvauthid=@cinvauthid and btaxcost=@btaxcost and binspect=@binspect and contractrowguid=@contractrowguid and iinvmpcost=@iinvmpcost and irowno=@irowno and sotype=@sotype and csocode=@csocode and cdemandmemo=@cdemandmemo and iordertype=@iordertype and csoordercode=@csoordercode and iorderseq=@iorderseq and iorderdid=@iorderdid and ippartid=@ippartid and ipquantity=@ipquantity and iptoseq=@iptoseq and cveninvcode=@cveninvcode and cveninvname=@cveninvname and sodid=@sodid and cordercode=@cordercode and bexigency=@bexigency and contractcode=@contractcode and contractrowno=@contractrowno and fretnum=@fretnum and fsumrefusequantity=@fsumrefusequantity and fsumrefusenum=@fsumrefusenum and fdtquantity=@fdtquantity and finvalidinnum=@finvalidinnum and finspectquantity=@finspectquantity and finspectnum=@finspectnum and vouchstate=@vouchstate and fininquantity=@fininquantity and fininnum=@fininnum and dValidateDate=@dValidateDate and inspecexchrate=@inspecexchrate and irejectautoid=@irejectautoid and iexpiratdatecalcu=@iexpiratdatecalcu and cexpirationdate=@cexpirationdate and dexpirationdate=@dexpirationdate and carrivalcode=@carrivalcode and cbatchproperty1=@cbatchproperty1 and cbatchproperty2=@cbatchproperty2 and cbatchproperty3=@cbatchproperty3 and cbatchproperty4=@cbatchproperty4 and cbatchproperty5=@cbatchproperty5 and cbatchproperty6=@cbatchproperty6 and cbatchproperty7=@cbatchproperty7 and cbatchproperty8=@cbatchproperty8 and cbatchproperty9=@cbatchproperty9 and cbatchproperty10=@cbatchproperty10 and cupsocode=@cupsocode and ivouchrowno=@ivouchrowno and cbmemo=@cbmemo and cbsysbarcode=@cbsysbarcode and iproducttype=@iproducttype and cmaininvcode=@cmaininvcode and imainmodetailsid=@imainmodetailsid and isourcemocode=@isourcemocode and isourcemodetailsid=@isourcemodetailsid and freworkquantity=@freworkquantity and freworknum=@freworknum and fsumreworkquantity=@fsumreworkquantity and fsumreworknum=@fsumreworknum and planlotnumber=@planlotnumber and bgift=@bgift and dlineclosedate=@dlineclosedate and cfactorycode=@cfactorycode and cfactoryname=@cfactoryname ");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@cwhcode", SqlDbType.NVarChar,10),
                    new SqlParameter("@cwhname", SqlDbType.NVarChar,20),
                    new SqlParameter("@autoid", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,12),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,50),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,20),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,20),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal,17),
                    new SqlParameter("@binvbatch", SqlDbType.Bit,1),
                    new SqlParameter("@cbatch", SqlDbType.NVarChar,60),
                    new SqlParameter("@dvdate", SqlDbType.DateTime),
                    new SqlParameter("@dpdate", SqlDbType.DateTime),
                    new SqlParameter("@imassdate", SqlDbType.Int,4),
                    new SqlParameter("@cmassunit", SqlDbType.TinyInt,1),
                    new SqlParameter("@cgspstate", SqlDbType.NVarChar,20),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@ioritaxcost", SqlDbType.Decimal,13),
                    new SqlParameter("@icorid", SqlDbType.Int,4),
                    new SqlParameter("@iquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@inum", SqlDbType.Decimal,13),
                    new SqlParameter("@ioricost", SqlDbType.Decimal,13),
                    new SqlParameter("@iorimoney", SqlDbType.Money,8),
                    new SqlParameter("@ioritaxprice", SqlDbType.Money,8),
                    new SqlParameter("@iorisum", SqlDbType.Money,8),
                    new SqlParameter("@icost", SqlDbType.Decimal,13),
                    new SqlParameter("@imoney", SqlDbType.Money,8),
                    new SqlParameter("@itaxprice", SqlDbType.Money,8),
                    new SqlParameter("@isum", SqlDbType.Money,8),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine26", SqlDbType.Float,8),
                    new SqlParameter("@cdefine27", SqlDbType.Float,8),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal,13),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,255),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,2),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,50),
                    new SqlParameter("@iposid", SqlDbType.Int,4),
                    new SqlParameter("@fvalidquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fvalidnum", SqlDbType.Decimal,13),
                    new SqlParameter("@fvalidinquan", SqlDbType.Decimal,13),
                    new SqlParameter("@fvalidinnum", SqlDbType.Decimal,17),
                    new SqlParameter("@fkpquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@finvalidquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@finvalidnum", SqlDbType.Decimal,13),
                    new SqlParameter("@finvalidinquan", SqlDbType.Decimal,13),
                    new SqlParameter("@fretquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@frefusequantity", SqlDbType.Decimal,13),
                    new SqlParameter("@frefusenum", SqlDbType.Decimal,17),
                    new SqlParameter("@frealquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@frealnum", SqlDbType.Decimal,13),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float,8),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float,8),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@rejectsource", SqlDbType.Bit,1),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt,1),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@binspect", SqlDbType.TinyInt,1),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier,16),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal,13),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt,1),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,50),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt,1),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,50),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,40),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,100),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,50),
                    new SqlParameter("@cordercode", SqlDbType.NVarChar,30),
                    new SqlParameter("@bexigency", SqlDbType.TinyInt,1),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,128),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,150),
                    new SqlParameter("@fretnum", SqlDbType.Decimal,13),
                    new SqlParameter("@fsumrefusequantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fsumrefusenum", SqlDbType.Decimal,17),
                    new SqlParameter("@fdtquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@finvalidinnum", SqlDbType.Decimal,13),
                    new SqlParameter("@finspectquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@finspectnum", SqlDbType.Decimal,13),
                    new SqlParameter("@vouchstate", SqlDbType.Int,4),
                    new SqlParameter("@fininquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fininnum", SqlDbType.Decimal,17),
                    new SqlParameter("@dValidateDate", SqlDbType.NVarChar,7),
                    new SqlParameter("@inspecexchrate", SqlDbType.Decimal,17),
                    new SqlParameter("@irejectautoid", SqlDbType.Int,4),
                    new SqlParameter("@iexpiratdatecalcu", SqlDbType.SmallInt,2),
                    new SqlParameter("@cexpirationdate", SqlDbType.NVarChar,20),
                    new SqlParameter("@dexpirationdate", SqlDbType.DateTime),
                    new SqlParameter("@carrivalcode", SqlDbType.NVarChar,80),
                    new SqlParameter("@cbatchproperty1", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty2", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty3", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty4", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty5", SqlDbType.Decimal,17),
                    new SqlParameter("@cbatchproperty6", SqlDbType.NVarChar,120),
                    new SqlParameter("@cbatchproperty7", SqlDbType.NVarChar,120),
                    new SqlParameter("@cbatchproperty8", SqlDbType.NVarChar,120),
                    new SqlParameter("@cbatchproperty9", SqlDbType.NVarChar,120),
                    new SqlParameter("@cbatchproperty10", SqlDbType.DateTime),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,120),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,80),
                    new SqlParameter("@iproducttype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cmaininvcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@imainmodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@isourcemocode", SqlDbType.NVarChar,60),
                    new SqlParameter("@isourcemodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@freworkquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@freworknum", SqlDbType.Decimal,13),
                    new SqlParameter("@fsumreworkquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fsumreworknum", SqlDbType.Decimal,13),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,40),
                    new SqlParameter("@bgift", SqlDbType.SmallInt,2),
                    new SqlParameter("@dlineclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,50),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,255)};
            parameters[0].Value = id;
            parameters[1].Value = cwhcode;
            parameters[2].Value = cwhname;
            parameters[3].Value = autoid;
            parameters[4].Value = cinvcode;
            parameters[5].Value = cinvaddcode;
            parameters[6].Value = cinvname;
            parameters[7].Value = cinvstd;
            parameters[8].Value = cinvccode;
            parameters[9].Value = cunitid;
            parameters[10].Value = ccomunitcode;
            parameters[11].Value = cinvm_unit;
            parameters[12].Value = igrouptype;
            parameters[13].Value = cgroupcode;
            parameters[14].Value = cinva_unit;
            parameters[15].Value = bservice;
            parameters[16].Value = iinvexchrate;
            parameters[17].Value = binvbatch;
            parameters[18].Value = cbatch;
            parameters[19].Value = dvdate;
            parameters[20].Value = dpdate;
            parameters[21].Value = imassdate;
            parameters[22].Value = cmassunit;
            parameters[23].Value = cgspstate;
            parameters[24].Value = ccloser;
            parameters[25].Value = ioritaxcost;
            parameters[26].Value = icorid;
            parameters[27].Value = iquantity;
            parameters[28].Value = inum;
            parameters[29].Value = ioricost;
            parameters[30].Value = iorimoney;
            parameters[31].Value = ioritaxprice;
            parameters[32].Value = iorisum;
            parameters[33].Value = icost;
            parameters[34].Value = imoney;
            parameters[35].Value = itaxprice;
            parameters[36].Value = isum;
            parameters[37].Value = cbcloser;
            parameters[38].Value = cfree1;
            parameters[39].Value = cfree2;
            parameters[40].Value = cdefine22;
            parameters[41].Value = cdefine23;
            parameters[42].Value = cdefine24;
            parameters[43].Value = cdefine25;
            parameters[44].Value = cdefine26;
            parameters[45].Value = cdefine27;
            parameters[46].Value = cdefine28;
            parameters[47].Value = cdefine29;
            parameters[48].Value = cdefine30;
            parameters[49].Value = cdefine31;
            parameters[50].Value = cdefine32;
            parameters[51].Value = cdefine33;
            parameters[52].Value = cdefine34;
            parameters[53].Value = cdefine35;
            parameters[54].Value = cdefine36;
            parameters[55].Value = cdefine37;
            parameters[56].Value = itaxrate;
            parameters[57].Value = citemcode;
            parameters[58].Value = citemname;
            parameters[59].Value = citem_class;
            parameters[60].Value = citem_name;
            parameters[61].Value = iposid;
            parameters[62].Value = fvalidquantity;
            parameters[63].Value = fvalidnum;
            parameters[64].Value = fvalidinquan;
            parameters[65].Value = fvalidinnum;
            parameters[66].Value = fkpquantity;
            parameters[67].Value = finvalidquantity;
            parameters[68].Value = finvalidnum;
            parameters[69].Value = finvalidinquan;
            parameters[70].Value = fretquantity;
            parameters[71].Value = frefusequantity;
            parameters[72].Value = frefusenum;
            parameters[73].Value = frealquantity;
            parameters[74].Value = frealnum;
            parameters[75].Value = cfree3;
            parameters[76].Value = cfree4;
            parameters[77].Value = cfree5;
            parameters[78].Value = cfree6;
            parameters[79].Value = cfree7;
            parameters[80].Value = cfree8;
            parameters[81].Value = cfree9;
            parameters[82].Value = cfree10;
            parameters[83].Value = cinvdefine1;
            parameters[84].Value = cinvdefine2;
            parameters[85].Value = cinvdefine3;
            parameters[86].Value = cinvdefine4;
            parameters[87].Value = cinvdefine5;
            parameters[88].Value = cinvdefine6;
            parameters[89].Value = cinvdefine7;
            parameters[90].Value = cinvdefine8;
            parameters[91].Value = cinvdefine9;
            parameters[92].Value = cinvdefine10;
            parameters[93].Value = cinvdefine11;
            parameters[94].Value = cinvdefine12;
            parameters[95].Value = cinvdefine13;
            parameters[96].Value = cinvdefine14;
            parameters[97].Value = cinvdefine15;
            parameters[98].Value = cinvdefine16;
            parameters[99].Value = rejectsource;
            parameters[100].Value = bgsp;
            parameters[101].Value = cinvauthid;
            parameters[102].Value = btaxcost;
            parameters[103].Value = binspect;
            parameters[104].Value = contractrowguid;
            parameters[105].Value = iinvmpcost;
            parameters[106].Value = irowno;
            parameters[107].Value = sotype;
            parameters[108].Value = csocode;
            parameters[109].Value = cdemandmemo;
            parameters[110].Value = iordertype;
            parameters[111].Value = csoordercode;
            parameters[112].Value = iorderseq;
            parameters[113].Value = iorderdid;
            parameters[114].Value = ippartid;
            parameters[115].Value = ipquantity;
            parameters[116].Value = iptoseq;
            parameters[117].Value = cveninvcode;
            parameters[118].Value = cveninvname;
            parameters[119].Value = sodid;
            parameters[120].Value = cordercode;
            parameters[121].Value = bexigency;
            parameters[122].Value = contractcode;
            parameters[123].Value = contractrowno;
            parameters[124].Value = fretnum;
            parameters[125].Value = fsumrefusequantity;
            parameters[126].Value = fsumrefusenum;
            parameters[127].Value = fdtquantity;
            parameters[128].Value = finvalidinnum;
            parameters[129].Value = finspectquantity;
            parameters[130].Value = finspectnum;
            parameters[131].Value = vouchstate;
            parameters[132].Value = fininquantity;
            parameters[133].Value = fininnum;
            parameters[134].Value = dValidateDate;
            parameters[135].Value = inspecexchrate;
            parameters[136].Value = irejectautoid;
            parameters[137].Value = iexpiratdatecalcu;
            parameters[138].Value = cexpirationdate;
            parameters[139].Value = dexpirationdate;
            parameters[140].Value = carrivalcode;
            parameters[141].Value = cbatchproperty1;
            parameters[142].Value = cbatchproperty2;
            parameters[143].Value = cbatchproperty3;
            parameters[144].Value = cbatchproperty4;
            parameters[145].Value = cbatchproperty5;
            parameters[146].Value = cbatchproperty6;
            parameters[147].Value = cbatchproperty7;
            parameters[148].Value = cbatchproperty8;
            parameters[149].Value = cbatchproperty9;
            parameters[150].Value = cbatchproperty10;
            parameters[151].Value = cupsocode;
            parameters[152].Value = ivouchrowno;
            parameters[153].Value = cbmemo;
            parameters[154].Value = cbsysbarcode;
            parameters[155].Value = iproducttype;
            parameters[156].Value = cmaininvcode;
            parameters[157].Value = imainmodetailsid;
            parameters[158].Value = isourcemocode;
            parameters[159].Value = isourcemodetailsid;
            parameters[160].Value = freworkquantity;
            parameters[161].Value = freworknum;
            parameters[162].Value = fsumreworkquantity;
            parameters[163].Value = fsumreworknum;
            parameters[164].Value = planlotnumber;
            parameters[165].Value = bgift;
            parameters[166].Value = dlineclosedate;
            parameters[167].Value = cfactorycode;
            parameters[168].Value = cfactoryname;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id, string cwhcode, string cwhname, int autoid, string cinvcode, string cinvaddcode, string cinvname, string cinvstd, string cinvccode, string cunitid, string ccomunitcode, string cinvm_unit, int igrouptype, string cgroupcode, string cinva_unit, bool bservice, decimal iinvexchrate, bool binvbatch, string cbatch, DateTime dvdate, DateTime dpdate, int imassdate, int cmassunit, string cgspstate, string ccloser, decimal ioritaxcost, int icorid, decimal iquantity, decimal inum, decimal ioricost, decimal iorimoney, decimal ioritaxprice, decimal iorisum, decimal icost, decimal imoney, decimal itaxprice, decimal isum, string cbcloser, string cfree1, string cfree2, string cdefine22, string cdefine23, string cdefine24, string cdefine25, decimal cdefine26, decimal cdefine27, string cdefine28, string cdefine29, string cdefine30, string cdefine31, string cdefine32, string cdefine33, int cdefine34, int cdefine35, DateTime cdefine36, DateTime cdefine37, decimal itaxrate, string citemcode, string citemname, string citem_class, string citem_name, int iposid, decimal fvalidquantity, decimal fvalidnum, decimal fvalidinquan, decimal fvalidinnum, decimal fkpquantity, decimal finvalidquantity, decimal finvalidnum, decimal finvalidinquan, decimal fretquantity, decimal frefusequantity, decimal frefusenum, decimal frealquantity, decimal frealnum, string cfree3, string cfree4, string cfree5, string cfree6, string cfree7, string cfree8, string cfree9, string cfree10, string cinvdefine1, string cinvdefine2, string cinvdefine3, string cinvdefine4, string cinvdefine5, string cinvdefine6, string cinvdefine7, string cinvdefine8, string cinvdefine9, string cinvdefine10, int cinvdefine11, int cinvdefine12, decimal cinvdefine13, decimal cinvdefine14, DateTime cinvdefine15, DateTime cinvdefine16, bool rejectsource, int bgsp, int cinvauthid, bool btaxcost, int binspect, Guid contractrowguid, decimal iinvmpcost, int irowno, int sotype, string csocode, string cdemandmemo, int iordertype, string csoordercode, int iorderseq, int iorderdid, int ippartid, decimal ipquantity, int iptoseq, string cveninvcode, string cveninvname, string sodid, string cordercode, int bexigency, string contractcode, string contractrowno, decimal fretnum, decimal fsumrefusequantity, decimal fsumrefusenum, decimal fdtquantity, decimal finvalidinnum, decimal finspectquantity, decimal finspectnum, int vouchstate, decimal fininquantity, decimal fininnum, string dValidateDate, decimal inspecexchrate, int irejectautoid, int iexpiratdatecalcu, string cexpirationdate, DateTime dexpirationdate, string carrivalcode, decimal cbatchproperty1, decimal cbatchproperty2, decimal cbatchproperty3, decimal cbatchproperty4, decimal cbatchproperty5, string cbatchproperty6, string cbatchproperty7, string cbatchproperty8, string cbatchproperty9, DateTime cbatchproperty10, string cupsocode, int ivouchrowno, string cbmemo, string cbsysbarcode, int iproducttype, string cmaininvcode, int imainmodetailsid, string isourcemocode, int isourcemodetailsid, decimal freworkquantity, decimal freworknum, decimal fsumreworkquantity, decimal fsumreworknum, string planlotnumber, int bgift, DateTime dlineclosedate, string cfactorycode, string cfactoryname)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from [pu_arrbody] ");
            strSql.Append(" where id=@id and cwhcode=@cwhcode and cwhname=@cwhname and autoid=@autoid and cinvcode=@cinvcode and cinvaddcode=@cinvaddcode and cinvname=@cinvname and cinvstd=@cinvstd and cinvccode=@cinvccode and cunitid=@cunitid and ccomunitcode=@ccomunitcode and cinvm_unit=@cinvm_unit and igrouptype=@igrouptype and cgroupcode=@cgroupcode and cinva_unit=@cinva_unit and bservice=@bservice and iinvexchrate=@iinvexchrate and binvbatch=@binvbatch and cbatch=@cbatch and dvdate=@dvdate and dpdate=@dpdate and imassdate=@imassdate and cmassunit=@cmassunit and cgspstate=@cgspstate and ccloser=@ccloser and ioritaxcost=@ioritaxcost and icorid=@icorid and iquantity=@iquantity and inum=@inum and ioricost=@ioricost and iorimoney=@iorimoney and ioritaxprice=@ioritaxprice and iorisum=@iorisum and icost=@icost and imoney=@imoney and itaxprice=@itaxprice and isum=@isum and cbcloser=@cbcloser and cfree1=@cfree1 and cfree2=@cfree2 and cdefine22=@cdefine22 and cdefine23=@cdefine23 and cdefine24=@cdefine24 and cdefine25=@cdefine25 and cdefine26=@cdefine26 and cdefine27=@cdefine27 and cdefine28=@cdefine28 and cdefine29=@cdefine29 and cdefine30=@cdefine30 and cdefine31=@cdefine31 and cdefine32=@cdefine32 and cdefine33=@cdefine33 and cdefine34=@cdefine34 and cdefine35=@cdefine35 and cdefine36=@cdefine36 and cdefine37=@cdefine37 and itaxrate=@itaxrate and citemcode=@citemcode and citemname=@citemname and citem_class=@citem_class and citem_name=@citem_name and iposid=@iposid and fvalidquantity=@fvalidquantity and fvalidnum=@fvalidnum and fvalidinquan=@fvalidinquan and fvalidinnum=@fvalidinnum and fkpquantity=@fkpquantity and finvalidquantity=@finvalidquantity and finvalidnum=@finvalidnum and finvalidinquan=@finvalidinquan and fretquantity=@fretquantity and frefusequantity=@frefusequantity and frefusenum=@frefusenum and frealquantity=@frealquantity and frealnum=@frealnum and cfree3=@cfree3 and cfree4=@cfree4 and cfree5=@cfree5 and cfree6=@cfree6 and cfree7=@cfree7 and cfree8=@cfree8 and cfree9=@cfree9 and cfree10=@cfree10 and cinvdefine1=@cinvdefine1 and cinvdefine2=@cinvdefine2 and cinvdefine3=@cinvdefine3 and cinvdefine4=@cinvdefine4 and cinvdefine5=@cinvdefine5 and cinvdefine6=@cinvdefine6 and cinvdefine7=@cinvdefine7 and cinvdefine8=@cinvdefine8 and cinvdefine9=@cinvdefine9 and cinvdefine10=@cinvdefine10 and cinvdefine11=@cinvdefine11 and cinvdefine12=@cinvdefine12 and cinvdefine13=@cinvdefine13 and cinvdefine14=@cinvdefine14 and cinvdefine15=@cinvdefine15 and cinvdefine16=@cinvdefine16 and rejectsource=@rejectsource and bgsp=@bgsp and cinvauthid=@cinvauthid and btaxcost=@btaxcost and binspect=@binspect and contractrowguid=@contractrowguid and iinvmpcost=@iinvmpcost and irowno=@irowno and sotype=@sotype and csocode=@csocode and cdemandmemo=@cdemandmemo and iordertype=@iordertype and csoordercode=@csoordercode and iorderseq=@iorderseq and iorderdid=@iorderdid and ippartid=@ippartid and ipquantity=@ipquantity and iptoseq=@iptoseq and cveninvcode=@cveninvcode and cveninvname=@cveninvname and sodid=@sodid and cordercode=@cordercode and bexigency=@bexigency and contractcode=@contractcode and contractrowno=@contractrowno and fretnum=@fretnum and fsumrefusequantity=@fsumrefusequantity and fsumrefusenum=@fsumrefusenum and fdtquantity=@fdtquantity and finvalidinnum=@finvalidinnum and finspectquantity=@finspectquantity and finspectnum=@finspectnum and vouchstate=@vouchstate and fininquantity=@fininquantity and fininnum=@fininnum and dValidateDate=@dValidateDate and inspecexchrate=@inspecexchrate and irejectautoid=@irejectautoid and iexpiratdatecalcu=@iexpiratdatecalcu and cexpirationdate=@cexpirationdate and dexpirationdate=@dexpirationdate and carrivalcode=@carrivalcode and cbatchproperty1=@cbatchproperty1 and cbatchproperty2=@cbatchproperty2 and cbatchproperty3=@cbatchproperty3 and cbatchproperty4=@cbatchproperty4 and cbatchproperty5=@cbatchproperty5 and cbatchproperty6=@cbatchproperty6 and cbatchproperty7=@cbatchproperty7 and cbatchproperty8=@cbatchproperty8 and cbatchproperty9=@cbatchproperty9 and cbatchproperty10=@cbatchproperty10 and cupsocode=@cupsocode and ivouchrowno=@ivouchrowno and cbmemo=@cbmemo and cbsysbarcode=@cbsysbarcode and iproducttype=@iproducttype and cmaininvcode=@cmaininvcode and imainmodetailsid=@imainmodetailsid and isourcemocode=@isourcemocode and isourcemodetailsid=@isourcemodetailsid and freworkquantity=@freworkquantity and freworknum=@freworknum and fsumreworkquantity=@fsumreworkquantity and fsumreworknum=@fsumreworknum and planlotnumber=@planlotnumber and bgift=@bgift and dlineclosedate=@dlineclosedate and cfactorycode=@cfactorycode and cfactoryname=@cfactoryname ");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@cwhcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cwhname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@autoid", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal),
                    new SqlParameter("@binvbatch", SqlDbType.Bit,1),
                    new SqlParameter("@cbatch", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dvdate", SqlDbType.DateTime),
                    new SqlParameter("@dpdate", SqlDbType.DateTime),
                    new SqlParameter("@imassdate", SqlDbType.Int,4),
                    new SqlParameter("@cmassunit", SqlDbType.TinyInt),
                    new SqlParameter("@cgspstate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ioritaxcost", SqlDbType.Decimal),
                    new SqlParameter("@icorid", SqlDbType.Int,4),
                    new SqlParameter("@iquantity", SqlDbType.Decimal),
                    new SqlParameter("@inum", SqlDbType.Decimal),
                    new SqlParameter("@ioricost", SqlDbType.Decimal),
                    new SqlParameter("@iorimoney", SqlDbType.Money),
                    new SqlParameter("@ioritaxprice", SqlDbType.Money),
                    new SqlParameter("@iorisum", SqlDbType.Money),
                    new SqlParameter("@icost", SqlDbType.Decimal),
                    new SqlParameter("@imoney", SqlDbType.Money),
                    new SqlParameter("@itaxprice", SqlDbType.Money),
                    new SqlParameter("@isum", SqlDbType.Money),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine26", SqlDbType.Float),
                    new SqlParameter("@cdefine27", SqlDbType.Float),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iposid", SqlDbType.Int,4),
                    new SqlParameter("@fvalidquantity", SqlDbType.Decimal),
                    new SqlParameter("@fvalidnum", SqlDbType.Decimal),
                    new SqlParameter("@fvalidinquan", SqlDbType.Decimal),
                    new SqlParameter("@fvalidinnum", SqlDbType.Decimal),
                    new SqlParameter("@fkpquantity", SqlDbType.Decimal),
                    new SqlParameter("@finvalidquantity", SqlDbType.Decimal),
                    new SqlParameter("@finvalidnum", SqlDbType.Decimal),
                    new SqlParameter("@finvalidinquan", SqlDbType.Decimal),
                    new SqlParameter("@fretquantity", SqlDbType.Decimal),
                    new SqlParameter("@frefusequantity", SqlDbType.Decimal),
                    new SqlParameter("@frefusenum", SqlDbType.Decimal),
                    new SqlParameter("@frealquantity", SqlDbType.Decimal),
                    new SqlParameter("@frealnum", SqlDbType.Decimal),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@rejectsource", SqlDbType.Bit,1),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@binspect", SqlDbType.TinyInt),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cordercode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bexigency", SqlDbType.TinyInt),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,-1),
                    new SqlParameter("@fretnum", SqlDbType.Decimal),
                    new SqlParameter("@fsumrefusequantity", SqlDbType.Decimal),
                    new SqlParameter("@fsumrefusenum", SqlDbType.Decimal),
                    new SqlParameter("@fdtquantity", SqlDbType.Decimal),
                    new SqlParameter("@finvalidinnum", SqlDbType.Decimal),
                    new SqlParameter("@finspectquantity", SqlDbType.Decimal),
                    new SqlParameter("@finspectnum", SqlDbType.Decimal),
                    new SqlParameter("@vouchstate", SqlDbType.Int,4),
                    new SqlParameter("@fininquantity", SqlDbType.Decimal),
                    new SqlParameter("@fininnum", SqlDbType.Decimal),
                    new SqlParameter("@dValidateDate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@inspecexchrate", SqlDbType.Decimal),
                    new SqlParameter("@irejectautoid", SqlDbType.Int,4),
                    new SqlParameter("@iexpiratdatecalcu", SqlDbType.SmallInt),
                    new SqlParameter("@cexpirationdate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dexpirationdate", SqlDbType.DateTime),
                    new SqlParameter("@carrivalcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty1", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty2", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty3", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty4", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty5", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty10", SqlDbType.DateTime),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iproducttype", SqlDbType.TinyInt),
                    new SqlParameter("@cmaininvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@imainmodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@isourcemocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@isourcemodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@freworkquantity", SqlDbType.Decimal),
                    new SqlParameter("@freworknum", SqlDbType.Decimal),
                    new SqlParameter("@fsumreworkquantity", SqlDbType.Decimal),
                    new SqlParameter("@fsumreworknum", SqlDbType.Decimal),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bgift", SqlDbType.SmallInt),
                    new SqlParameter("@dlineclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,-1)};
            parameters[0].Value = id;
            parameters[1].Value = cwhcode;
            parameters[2].Value = cwhname;
            parameters[3].Value = autoid;
            parameters[4].Value = cinvcode;
            parameters[5].Value = cinvaddcode;
            parameters[6].Value = cinvname;
            parameters[7].Value = cinvstd;
            parameters[8].Value = cinvccode;
            parameters[9].Value = cunitid;
            parameters[10].Value = ccomunitcode;
            parameters[11].Value = cinvm_unit;
            parameters[12].Value = igrouptype;
            parameters[13].Value = cgroupcode;
            parameters[14].Value = cinva_unit;
            parameters[15].Value = bservice;
            parameters[16].Value = iinvexchrate;
            parameters[17].Value = binvbatch;
            parameters[18].Value = cbatch;
            parameters[19].Value = dvdate;
            parameters[20].Value = dpdate;
            parameters[21].Value = imassdate;
            parameters[22].Value = cmassunit;
            parameters[23].Value = cgspstate;
            parameters[24].Value = ccloser;
            parameters[25].Value = ioritaxcost;
            parameters[26].Value = icorid;
            parameters[27].Value = iquantity;
            parameters[28].Value = inum;
            parameters[29].Value = ioricost;
            parameters[30].Value = iorimoney;
            parameters[31].Value = ioritaxprice;
            parameters[32].Value = iorisum;
            parameters[33].Value = icost;
            parameters[34].Value = imoney;
            parameters[35].Value = itaxprice;
            parameters[36].Value = isum;
            parameters[37].Value = cbcloser;
            parameters[38].Value = cfree1;
            parameters[39].Value = cfree2;
            parameters[40].Value = cdefine22;
            parameters[41].Value = cdefine23;
            parameters[42].Value = cdefine24;
            parameters[43].Value = cdefine25;
            parameters[44].Value = cdefine26;
            parameters[45].Value = cdefine27;
            parameters[46].Value = cdefine28;
            parameters[47].Value = cdefine29;
            parameters[48].Value = cdefine30;
            parameters[49].Value = cdefine31;
            parameters[50].Value = cdefine32;
            parameters[51].Value = cdefine33;
            parameters[52].Value = cdefine34;
            parameters[53].Value = cdefine35;
            parameters[54].Value = cdefine36;
            parameters[55].Value = cdefine37;
            parameters[56].Value = itaxrate;
            parameters[57].Value = citemcode;
            parameters[58].Value = citemname;
            parameters[59].Value = citem_class;
            parameters[60].Value = citem_name;
            parameters[61].Value = iposid;
            parameters[62].Value = fvalidquantity;
            parameters[63].Value = fvalidnum;
            parameters[64].Value = fvalidinquan;
            parameters[65].Value = fvalidinnum;
            parameters[66].Value = fkpquantity;
            parameters[67].Value = finvalidquantity;
            parameters[68].Value = finvalidnum;
            parameters[69].Value = finvalidinquan;
            parameters[70].Value = fretquantity;
            parameters[71].Value = frefusequantity;
            parameters[72].Value = frefusenum;
            parameters[73].Value = frealquantity;
            parameters[74].Value = frealnum;
            parameters[75].Value = cfree3;
            parameters[76].Value = cfree4;
            parameters[77].Value = cfree5;
            parameters[78].Value = cfree6;
            parameters[79].Value = cfree7;
            parameters[80].Value = cfree8;
            parameters[81].Value = cfree9;
            parameters[82].Value = cfree10;
            parameters[83].Value = cinvdefine1;
            parameters[84].Value = cinvdefine2;
            parameters[85].Value = cinvdefine3;
            parameters[86].Value = cinvdefine4;
            parameters[87].Value = cinvdefine5;
            parameters[88].Value = cinvdefine6;
            parameters[89].Value = cinvdefine7;
            parameters[90].Value = cinvdefine8;
            parameters[91].Value = cinvdefine9;
            parameters[92].Value = cinvdefine10;
            parameters[93].Value = cinvdefine11;
            parameters[94].Value = cinvdefine12;
            parameters[95].Value = cinvdefine13;
            parameters[96].Value = cinvdefine14;
            parameters[97].Value = cinvdefine15;
            parameters[98].Value = cinvdefine16;
            parameters[99].Value = rejectsource;
            parameters[100].Value = bgsp;
            parameters[101].Value = cinvauthid;
            parameters[102].Value = btaxcost;
            parameters[103].Value = binspect;
            parameters[104].Value = contractrowguid;
            parameters[105].Value = iinvmpcost;
            parameters[106].Value = irowno;
            parameters[107].Value = sotype;
            parameters[108].Value = csocode;
            parameters[109].Value = cdemandmemo;
            parameters[110].Value = iordertype;
            parameters[111].Value = csoordercode;
            parameters[112].Value = iorderseq;
            parameters[113].Value = iorderdid;
            parameters[114].Value = ippartid;
            parameters[115].Value = ipquantity;
            parameters[116].Value = iptoseq;
            parameters[117].Value = cveninvcode;
            parameters[118].Value = cveninvname;
            parameters[119].Value = sodid;
            parameters[120].Value = cordercode;
            parameters[121].Value = bexigency;
            parameters[122].Value = contractcode;
            parameters[123].Value = contractrowno;
            parameters[124].Value = fretnum;
            parameters[125].Value = fsumrefusequantity;
            parameters[126].Value = fsumrefusenum;
            parameters[127].Value = fdtquantity;
            parameters[128].Value = finvalidinnum;
            parameters[129].Value = finspectquantity;
            parameters[130].Value = finspectnum;
            parameters[131].Value = vouchstate;
            parameters[132].Value = fininquantity;
            parameters[133].Value = fininnum;
            parameters[134].Value = dValidateDate;
            parameters[135].Value = inspecexchrate;
            parameters[136].Value = irejectautoid;
            parameters[137].Value = iexpiratdatecalcu;
            parameters[138].Value = cexpirationdate;
            parameters[139].Value = dexpirationdate;
            parameters[140].Value = carrivalcode;
            parameters[141].Value = cbatchproperty1;
            parameters[142].Value = cbatchproperty2;
            parameters[143].Value = cbatchproperty3;
            parameters[144].Value = cbatchproperty4;
            parameters[145].Value = cbatchproperty5;
            parameters[146].Value = cbatchproperty6;
            parameters[147].Value = cbatchproperty7;
            parameters[148].Value = cbatchproperty8;
            parameters[149].Value = cbatchproperty9;
            parameters[150].Value = cbatchproperty10;
            parameters[151].Value = cupsocode;
            parameters[152].Value = ivouchrowno;
            parameters[153].Value = cbmemo;
            parameters[154].Value = cbsysbarcode;
            parameters[155].Value = iproducttype;
            parameters[156].Value = cmaininvcode;
            parameters[157].Value = imainmodetailsid;
            parameters[158].Value = isourcemocode;
            parameters[159].Value = isourcemodetailsid;
            parameters[160].Value = freworkquantity;
            parameters[161].Value = freworknum;
            parameters[162].Value = fsumreworkquantity;
            parameters[163].Value = fsumreworknum;
            parameters[164].Value = planlotnumber;
            parameters[165].Value = bgift;
            parameters[166].Value = dlineclosedate;
            parameters[167].Value = cfactorycode;
            parameters[168].Value = cfactoryname;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public void GetModel(int id, string cwhcode, string cwhname, int autoid, string cinvcode, string cinvaddcode, string cinvname, string cinvstd, string cinvccode, string cunitid, string ccomunitcode, string cinvm_unit, int igrouptype, string cgroupcode, string cinva_unit, bool bservice, decimal iinvexchrate, bool binvbatch, string cbatch, DateTime dvdate, DateTime dpdate, int imassdate, int cmassunit, string cgspstate, string ccloser, decimal ioritaxcost, int icorid, decimal iquantity, decimal inum, decimal ioricost, decimal iorimoney, decimal ioritaxprice, decimal iorisum, decimal icost, decimal imoney, decimal itaxprice, decimal isum, string cbcloser, string cfree1, string cfree2, string cdefine22, string cdefine23, string cdefine24, string cdefine25, decimal cdefine26, decimal cdefine27, string cdefine28, string cdefine29, string cdefine30, string cdefine31, string cdefine32, string cdefine33, int cdefine34, int cdefine35, DateTime cdefine36, DateTime cdefine37, decimal itaxrate, string citemcode, string citemname, string citem_class, string citem_name, int iposid, decimal fvalidquantity, decimal fvalidnum, decimal fvalidinquan, decimal fvalidinnum, decimal fkpquantity, decimal finvalidquantity, decimal finvalidnum, decimal finvalidinquan, decimal fretquantity, decimal frefusequantity, decimal frefusenum, decimal frealquantity, decimal frealnum, string cfree3, string cfree4, string cfree5, string cfree6, string cfree7, string cfree8, string cfree9, string cfree10, string cinvdefine1, string cinvdefine2, string cinvdefine3, string cinvdefine4, string cinvdefine5, string cinvdefine6, string cinvdefine7, string cinvdefine8, string cinvdefine9, string cinvdefine10, int cinvdefine11, int cinvdefine12, decimal cinvdefine13, decimal cinvdefine14, DateTime cinvdefine15, DateTime cinvdefine16, bool rejectsource, int bgsp, int cinvauthid, bool btaxcost, int binspect, Guid contractrowguid, decimal iinvmpcost, int irowno, int sotype, string csocode, string cdemandmemo, int iordertype, string csoordercode, int iorderseq, int iorderdid, int ippartid, decimal ipquantity, int iptoseq, string cveninvcode, string cveninvname, string sodid, string cordercode, int bexigency, string contractcode, string contractrowno, decimal fretnum, decimal fsumrefusequantity, decimal fsumrefusenum, decimal fdtquantity, decimal finvalidinnum, decimal finspectquantity, decimal finspectnum, int vouchstate, decimal fininquantity, decimal fininnum, string dValidateDate, decimal inspecexchrate, int irejectautoid, int iexpiratdatecalcu, string cexpirationdate, DateTime dexpirationdate, string carrivalcode, decimal cbatchproperty1, decimal cbatchproperty2, decimal cbatchproperty3, decimal cbatchproperty4, decimal cbatchproperty5, string cbatchproperty6, string cbatchproperty7, string cbatchproperty8, string cbatchproperty9, DateTime cbatchproperty10, string cupsocode, int ivouchrowno, string cbmemo, string cbsysbarcode, int iproducttype, string cmaininvcode, int imainmodetailsid, string isourcemocode, int isourcemodetailsid, decimal freworkquantity, decimal freworknum, decimal fsumreworkquantity, decimal fsumreworknum, string planlotnumber, int bgift, DateTime dlineclosedate, string cfactorycode, string cfactoryname)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select id,cwhcode,cwhname,autoid,cinvcode,cinvaddcode,cinvname,cinvstd,cinvccode,cunitid,ccomunitcode,cinvm_unit,igrouptype,cgroupcode,cinva_unit,bservice,iinvexchrate,binvbatch,cbatch,dvdate,dpdate,imassdate,cmassunit,cgspstate,ccloser,ioritaxcost,icorid,iquantity,inum,ioricost,iorimoney,ioritaxprice,iorisum,icost,imoney,itaxprice,isum,cbcloser,cfree1,cfree2,cdefine22,cdefine23,cdefine24,cdefine25,cdefine26,cdefine27,cdefine28,cdefine29,cdefine30,cdefine31,cdefine32,cdefine33,cdefine34,cdefine35,cdefine36,cdefine37,itaxrate,citemcode,citemname,citem_class,citem_name,iposid,fvalidquantity,fvalidnum,fvalidinquan,fvalidinnum,fkpquantity,finvalidquantity,finvalidnum,finvalidinquan,fretquantity,frefusequantity,frefusenum,frealquantity,frealnum,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10,cinvdefine1,cinvdefine2,cinvdefine3,cinvdefine4,cinvdefine5,cinvdefine6,cinvdefine7,cinvdefine8,cinvdefine9,cinvdefine10,cinvdefine11,cinvdefine12,cinvdefine13,cinvdefine14,cinvdefine15,cinvdefine16,rejectsource,bgsp,cinvauthid,btaxcost,binspect,contractrowguid,iinvmpcost,irowno,sotype,csocode,cdemandmemo,iordertype,csoordercode,iorderseq,iorderdid,ippartid,ipquantity,iptoseq,cveninvcode,cveninvname,sodid,cordercode,bexigency,contractcode,contractrowno,fretnum,fsumrefusequantity,fsumrefusenum,fdtquantity,finvalidinnum,finspectquantity,finspectnum,vouchstate,fininquantity,fininnum,dValidateDate,inspecexchrate,irejectautoid,iexpiratdatecalcu,cexpirationdate,dexpirationdate,carrivalcode,cbatchproperty1,cbatchproperty2,cbatchproperty3,cbatchproperty4,cbatchproperty5,cbatchproperty6,cbatchproperty7,cbatchproperty8,cbatchproperty9,cbatchproperty10,cupsocode,ivouchrowno,cbmemo,cbsysbarcode,iproducttype,cmaininvcode,imainmodetailsid,isourcemocode,isourcemodetailsid,freworkquantity,freworknum,fsumreworkquantity,fsumreworknum,planlotnumber,bgift,dlineclosedate,cfactorycode,cfactoryname ");
            strSql.Append(" FROM [pu_arrbody] ");
            strSql.Append(" where id=@id and cwhcode=@cwhcode and cwhname=@cwhname and autoid=@autoid and cinvcode=@cinvcode and cinvaddcode=@cinvaddcode and cinvname=@cinvname and cinvstd=@cinvstd and cinvccode=@cinvccode and cunitid=@cunitid and ccomunitcode=@ccomunitcode and cinvm_unit=@cinvm_unit and igrouptype=@igrouptype and cgroupcode=@cgroupcode and cinva_unit=@cinva_unit and bservice=@bservice and iinvexchrate=@iinvexchrate and binvbatch=@binvbatch and cbatch=@cbatch and dvdate=@dvdate and dpdate=@dpdate and imassdate=@imassdate and cmassunit=@cmassunit and cgspstate=@cgspstate and ccloser=@ccloser and ioritaxcost=@ioritaxcost and icorid=@icorid and iquantity=@iquantity and inum=@inum and ioricost=@ioricost and iorimoney=@iorimoney and ioritaxprice=@ioritaxprice and iorisum=@iorisum and icost=@icost and imoney=@imoney and itaxprice=@itaxprice and isum=@isum and cbcloser=@cbcloser and cfree1=@cfree1 and cfree2=@cfree2 and cdefine22=@cdefine22 and cdefine23=@cdefine23 and cdefine24=@cdefine24 and cdefine25=@cdefine25 and cdefine26=@cdefine26 and cdefine27=@cdefine27 and cdefine28=@cdefine28 and cdefine29=@cdefine29 and cdefine30=@cdefine30 and cdefine31=@cdefine31 and cdefine32=@cdefine32 and cdefine33=@cdefine33 and cdefine34=@cdefine34 and cdefine35=@cdefine35 and cdefine36=@cdefine36 and cdefine37=@cdefine37 and itaxrate=@itaxrate and citemcode=@citemcode and citemname=@citemname and citem_class=@citem_class and citem_name=@citem_name and iposid=@iposid and fvalidquantity=@fvalidquantity and fvalidnum=@fvalidnum and fvalidinquan=@fvalidinquan and fvalidinnum=@fvalidinnum and fkpquantity=@fkpquantity and finvalidquantity=@finvalidquantity and finvalidnum=@finvalidnum and finvalidinquan=@finvalidinquan and fretquantity=@fretquantity and frefusequantity=@frefusequantity and frefusenum=@frefusenum and frealquantity=@frealquantity and frealnum=@frealnum and cfree3=@cfree3 and cfree4=@cfree4 and cfree5=@cfree5 and cfree6=@cfree6 and cfree7=@cfree7 and cfree8=@cfree8 and cfree9=@cfree9 and cfree10=@cfree10 and cinvdefine1=@cinvdefine1 and cinvdefine2=@cinvdefine2 and cinvdefine3=@cinvdefine3 and cinvdefine4=@cinvdefine4 and cinvdefine5=@cinvdefine5 and cinvdefine6=@cinvdefine6 and cinvdefine7=@cinvdefine7 and cinvdefine8=@cinvdefine8 and cinvdefine9=@cinvdefine9 and cinvdefine10=@cinvdefine10 and cinvdefine11=@cinvdefine11 and cinvdefine12=@cinvdefine12 and cinvdefine13=@cinvdefine13 and cinvdefine14=@cinvdefine14 and cinvdefine15=@cinvdefine15 and cinvdefine16=@cinvdefine16 and rejectsource=@rejectsource and bgsp=@bgsp and cinvauthid=@cinvauthid and btaxcost=@btaxcost and binspect=@binspect and contractrowguid=@contractrowguid and iinvmpcost=@iinvmpcost and irowno=@irowno and sotype=@sotype and csocode=@csocode and cdemandmemo=@cdemandmemo and iordertype=@iordertype and csoordercode=@csoordercode and iorderseq=@iorderseq and iorderdid=@iorderdid and ippartid=@ippartid and ipquantity=@ipquantity and iptoseq=@iptoseq and cveninvcode=@cveninvcode and cveninvname=@cveninvname and sodid=@sodid and cordercode=@cordercode and bexigency=@bexigency and contractcode=@contractcode and contractrowno=@contractrowno and fretnum=@fretnum and fsumrefusequantity=@fsumrefusequantity and fsumrefusenum=@fsumrefusenum and fdtquantity=@fdtquantity and finvalidinnum=@finvalidinnum and finspectquantity=@finspectquantity and finspectnum=@finspectnum and vouchstate=@vouchstate and fininquantity=@fininquantity and fininnum=@fininnum and dValidateDate=@dValidateDate and inspecexchrate=@inspecexchrate and irejectautoid=@irejectautoid and iexpiratdatecalcu=@iexpiratdatecalcu and cexpirationdate=@cexpirationdate and dexpirationdate=@dexpirationdate and carrivalcode=@carrivalcode and cbatchproperty1=@cbatchproperty1 and cbatchproperty2=@cbatchproperty2 and cbatchproperty3=@cbatchproperty3 and cbatchproperty4=@cbatchproperty4 and cbatchproperty5=@cbatchproperty5 and cbatchproperty6=@cbatchproperty6 and cbatchproperty7=@cbatchproperty7 and cbatchproperty8=@cbatchproperty8 and cbatchproperty9=@cbatchproperty9 and cbatchproperty10=@cbatchproperty10 and cupsocode=@cupsocode and ivouchrowno=@ivouchrowno and cbmemo=@cbmemo and cbsysbarcode=@cbsysbarcode and iproducttype=@iproducttype and cmaininvcode=@cmaininvcode and imainmodetailsid=@imainmodetailsid and isourcemocode=@isourcemocode and isourcemodetailsid=@isourcemodetailsid and freworkquantity=@freworkquantity and freworknum=@freworknum and fsumreworkquantity=@fsumreworkquantity and fsumreworknum=@fsumreworknum and planlotnumber=@planlotnumber and bgift=@bgift and dlineclosedate=@dlineclosedate and cfactorycode=@cfactorycode and cfactoryname=@cfactoryname ");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@cwhcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cwhname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@autoid", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal),
                    new SqlParameter("@binvbatch", SqlDbType.Bit,1),
                    new SqlParameter("@cbatch", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dvdate", SqlDbType.DateTime),
                    new SqlParameter("@dpdate", SqlDbType.DateTime),
                    new SqlParameter("@imassdate", SqlDbType.Int,4),
                    new SqlParameter("@cmassunit", SqlDbType.TinyInt),
                    new SqlParameter("@cgspstate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ioritaxcost", SqlDbType.Decimal),
                    new SqlParameter("@icorid", SqlDbType.Int,4),
                    new SqlParameter("@iquantity", SqlDbType.Decimal),
                    new SqlParameter("@inum", SqlDbType.Decimal),
                    new SqlParameter("@ioricost", SqlDbType.Decimal),
                    new SqlParameter("@iorimoney", SqlDbType.Money),
                    new SqlParameter("@ioritaxprice", SqlDbType.Money),
                    new SqlParameter("@iorisum", SqlDbType.Money),
                    new SqlParameter("@icost", SqlDbType.Decimal),
                    new SqlParameter("@imoney", SqlDbType.Money),
                    new SqlParameter("@itaxprice", SqlDbType.Money),
                    new SqlParameter("@isum", SqlDbType.Money),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine26", SqlDbType.Float),
                    new SqlParameter("@cdefine27", SqlDbType.Float),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@itaxrate", SqlDbType.Decimal),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iposid", SqlDbType.Int,4),
                    new SqlParameter("@fvalidquantity", SqlDbType.Decimal),
                    new SqlParameter("@fvalidnum", SqlDbType.Decimal),
                    new SqlParameter("@fvalidinquan", SqlDbType.Decimal),
                    new SqlParameter("@fvalidinnum", SqlDbType.Decimal),
                    new SqlParameter("@fkpquantity", SqlDbType.Decimal),
                    new SqlParameter("@finvalidquantity", SqlDbType.Decimal),
                    new SqlParameter("@finvalidnum", SqlDbType.Decimal),
                    new SqlParameter("@finvalidinquan", SqlDbType.Decimal),
                    new SqlParameter("@fretquantity", SqlDbType.Decimal),
                    new SqlParameter("@frefusequantity", SqlDbType.Decimal),
                    new SqlParameter("@frefusenum", SqlDbType.Decimal),
                    new SqlParameter("@frealquantity", SqlDbType.Decimal),
                    new SqlParameter("@frealnum", SqlDbType.Decimal),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@rejectsource", SqlDbType.Bit,1),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@binspect", SqlDbType.TinyInt),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cordercode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bexigency", SqlDbType.TinyInt),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,-1),
                    new SqlParameter("@fretnum", SqlDbType.Decimal),
                    new SqlParameter("@fsumrefusequantity", SqlDbType.Decimal),
                    new SqlParameter("@fsumrefusenum", SqlDbType.Decimal),
                    new SqlParameter("@fdtquantity", SqlDbType.Decimal),
                    new SqlParameter("@finvalidinnum", SqlDbType.Decimal),
                    new SqlParameter("@finspectquantity", SqlDbType.Decimal),
                    new SqlParameter("@finspectnum", SqlDbType.Decimal),
                    new SqlParameter("@vouchstate", SqlDbType.Int,4),
                    new SqlParameter("@fininquantity", SqlDbType.Decimal),
                    new SqlParameter("@fininnum", SqlDbType.Decimal),
                    new SqlParameter("@dValidateDate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@inspecexchrate", SqlDbType.Decimal),
                    new SqlParameter("@irejectautoid", SqlDbType.Int,4),
                    new SqlParameter("@iexpiratdatecalcu", SqlDbType.SmallInt),
                    new SqlParameter("@cexpirationdate", SqlDbType.NVarChar,-1),
                    new SqlParameter("@dexpirationdate", SqlDbType.DateTime),
                    new SqlParameter("@carrivalcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty1", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty2", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty3", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty4", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty5", SqlDbType.Decimal),
                    new SqlParameter("@cbatchproperty6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbatchproperty10", SqlDbType.DateTime),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iproducttype", SqlDbType.TinyInt),
                    new SqlParameter("@cmaininvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@imainmodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@isourcemocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@isourcemodetailsid", SqlDbType.Int,4),
                    new SqlParameter("@freworkquantity", SqlDbType.Decimal),
                    new SqlParameter("@freworknum", SqlDbType.Decimal),
                    new SqlParameter("@fsumreworkquantity", SqlDbType.Decimal),
                    new SqlParameter("@fsumreworknum", SqlDbType.Decimal),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bgift", SqlDbType.SmallInt),
                    new SqlParameter("@dlineclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,-1)};
            parameters[0].Value = id;
            parameters[1].Value = cwhcode;
            parameters[2].Value = cwhname;
            parameters[3].Value = autoid;
            parameters[4].Value = cinvcode;
            parameters[5].Value = cinvaddcode;
            parameters[6].Value = cinvname;
            parameters[7].Value = cinvstd;
            parameters[8].Value = cinvccode;
            parameters[9].Value = cunitid;
            parameters[10].Value = ccomunitcode;
            parameters[11].Value = cinvm_unit;
            parameters[12].Value = igrouptype;
            parameters[13].Value = cgroupcode;
            parameters[14].Value = cinva_unit;
            parameters[15].Value = bservice;
            parameters[16].Value = iinvexchrate;
            parameters[17].Value = binvbatch;
            parameters[18].Value = cbatch;
            parameters[19].Value = dvdate;
            parameters[20].Value = dpdate;
            parameters[21].Value = imassdate;
            parameters[22].Value = cmassunit;
            parameters[23].Value = cgspstate;
            parameters[24].Value = ccloser;
            parameters[25].Value = ioritaxcost;
            parameters[26].Value = icorid;
            parameters[27].Value = iquantity;
            parameters[28].Value = inum;
            parameters[29].Value = ioricost;
            parameters[30].Value = iorimoney;
            parameters[31].Value = ioritaxprice;
            parameters[32].Value = iorisum;
            parameters[33].Value = icost;
            parameters[34].Value = imoney;
            parameters[35].Value = itaxprice;
            parameters[36].Value = isum;
            parameters[37].Value = cbcloser;
            parameters[38].Value = cfree1;
            parameters[39].Value = cfree2;
            parameters[40].Value = cdefine22;
            parameters[41].Value = cdefine23;
            parameters[42].Value = cdefine24;
            parameters[43].Value = cdefine25;
            parameters[44].Value = cdefine26;
            parameters[45].Value = cdefine27;
            parameters[46].Value = cdefine28;
            parameters[47].Value = cdefine29;
            parameters[48].Value = cdefine30;
            parameters[49].Value = cdefine31;
            parameters[50].Value = cdefine32;
            parameters[51].Value = cdefine33;
            parameters[52].Value = cdefine34;
            parameters[53].Value = cdefine35;
            parameters[54].Value = cdefine36;
            parameters[55].Value = cdefine37;
            parameters[56].Value = itaxrate;
            parameters[57].Value = citemcode;
            parameters[58].Value = citemname;
            parameters[59].Value = citem_class;
            parameters[60].Value = citem_name;
            parameters[61].Value = iposid;
            parameters[62].Value = fvalidquantity;
            parameters[63].Value = fvalidnum;
            parameters[64].Value = fvalidinquan;
            parameters[65].Value = fvalidinnum;
            parameters[66].Value = fkpquantity;
            parameters[67].Value = finvalidquantity;
            parameters[68].Value = finvalidnum;
            parameters[69].Value = finvalidinquan;
            parameters[70].Value = fretquantity;
            parameters[71].Value = frefusequantity;
            parameters[72].Value = frefusenum;
            parameters[73].Value = frealquantity;
            parameters[74].Value = frealnum;
            parameters[75].Value = cfree3;
            parameters[76].Value = cfree4;
            parameters[77].Value = cfree5;
            parameters[78].Value = cfree6;
            parameters[79].Value = cfree7;
            parameters[80].Value = cfree8;
            parameters[81].Value = cfree9;
            parameters[82].Value = cfree10;
            parameters[83].Value = cinvdefine1;
            parameters[84].Value = cinvdefine2;
            parameters[85].Value = cinvdefine3;
            parameters[86].Value = cinvdefine4;
            parameters[87].Value = cinvdefine5;
            parameters[88].Value = cinvdefine6;
            parameters[89].Value = cinvdefine7;
            parameters[90].Value = cinvdefine8;
            parameters[91].Value = cinvdefine9;
            parameters[92].Value = cinvdefine10;
            parameters[93].Value = cinvdefine11;
            parameters[94].Value = cinvdefine12;
            parameters[95].Value = cinvdefine13;
            parameters[96].Value = cinvdefine14;
            parameters[97].Value = cinvdefine15;
            parameters[98].Value = cinvdefine16;
            parameters[99].Value = rejectsource;
            parameters[100].Value = bgsp;
            parameters[101].Value = cinvauthid;
            parameters[102].Value = btaxcost;
            parameters[103].Value = binspect;
            parameters[104].Value = contractrowguid;
            parameters[105].Value = iinvmpcost;
            parameters[106].Value = irowno;
            parameters[107].Value = sotype;
            parameters[108].Value = csocode;
            parameters[109].Value = cdemandmemo;
            parameters[110].Value = iordertype;
            parameters[111].Value = csoordercode;
            parameters[112].Value = iorderseq;
            parameters[113].Value = iorderdid;
            parameters[114].Value = ippartid;
            parameters[115].Value = ipquantity;
            parameters[116].Value = iptoseq;
            parameters[117].Value = cveninvcode;
            parameters[118].Value = cveninvname;
            parameters[119].Value = sodid;
            parameters[120].Value = cordercode;
            parameters[121].Value = bexigency;
            parameters[122].Value = contractcode;
            parameters[123].Value = contractrowno;
            parameters[124].Value = fretnum;
            parameters[125].Value = fsumrefusequantity;
            parameters[126].Value = fsumrefusenum;
            parameters[127].Value = fdtquantity;
            parameters[128].Value = finvalidinnum;
            parameters[129].Value = finspectquantity;
            parameters[130].Value = finspectnum;
            parameters[131].Value = vouchstate;
            parameters[132].Value = fininquantity;
            parameters[133].Value = fininnum;
            parameters[134].Value = dValidateDate;
            parameters[135].Value = inspecexchrate;
            parameters[136].Value = irejectautoid;
            parameters[137].Value = iexpiratdatecalcu;
            parameters[138].Value = cexpirationdate;
            parameters[139].Value = dexpirationdate;
            parameters[140].Value = carrivalcode;
            parameters[141].Value = cbatchproperty1;
            parameters[142].Value = cbatchproperty2;
            parameters[143].Value = cbatchproperty3;
            parameters[144].Value = cbatchproperty4;
            parameters[145].Value = cbatchproperty5;
            parameters[146].Value = cbatchproperty6;
            parameters[147].Value = cbatchproperty7;
            parameters[148].Value = cbatchproperty8;
            parameters[149].Value = cbatchproperty9;
            parameters[150].Value = cbatchproperty10;
            parameters[151].Value = cupsocode;
            parameters[152].Value = ivouchrowno;
            parameters[153].Value = cbmemo;
            parameters[154].Value = cbsysbarcode;
            parameters[155].Value = iproducttype;
            parameters[156].Value = cmaininvcode;
            parameters[157].Value = imainmodetailsid;
            parameters[158].Value = isourcemocode;
            parameters[159].Value = isourcemodetailsid;
            parameters[160].Value = freworkquantity;
            parameters[161].Value = freworknum;
            parameters[162].Value = fsumreworkquantity;
            parameters[163].Value = fsumreworknum;
            parameters[164].Value = planlotnumber;
            parameters[165].Value = bgift;
            parameters[166].Value = dlineclosedate;
            parameters[167].Value = cfactorycode;
            parameters[168].Value = cfactoryname;

            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["id"] != null && ds.Tables[0].Rows[0]["id"].ToString() != "")
                {
                    this.id = int.Parse(ds.Tables[0].Rows[0]["id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cwhcode"] != null)
                {
                    this.cwhcode = ds.Tables[0].Rows[0]["cwhcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cwhname"] != null)
                {
                    this.cwhname = ds.Tables[0].Rows[0]["cwhname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["autoid"] != null && ds.Tables[0].Rows[0]["autoid"].ToString() != "")
                {
                    this.autoid = int.Parse(ds.Tables[0].Rows[0]["autoid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvcode"] != null)
                {
                    this.cinvcode = ds.Tables[0].Rows[0]["cinvcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvaddcode"] != null)
                {
                    this.cinvaddcode = ds.Tables[0].Rows[0]["cinvaddcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvname"] != null)
                {
                    this.cinvname = ds.Tables[0].Rows[0]["cinvname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvstd"] != null)
                {
                    this.cinvstd = ds.Tables[0].Rows[0]["cinvstd"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvccode"] != null)
                {
                    this.cinvccode = ds.Tables[0].Rows[0]["cinvccode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cunitid"] != null)
                {
                    this.cunitid = ds.Tables[0].Rows[0]["cunitid"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ccomunitcode"] != null)
                {
                    this.ccomunitcode = ds.Tables[0].Rows[0]["ccomunitcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvm_unit"] != null)
                {
                    this.cinvm_unit = ds.Tables[0].Rows[0]["cinvm_unit"].ToString();
                }
                if (ds.Tables[0].Rows[0]["igrouptype"] != null && ds.Tables[0].Rows[0]["igrouptype"].ToString() != "")
                {
                    this.igrouptype = int.Parse(ds.Tables[0].Rows[0]["igrouptype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cgroupcode"] != null)
                {
                    this.cgroupcode = ds.Tables[0].Rows[0]["cgroupcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinva_unit"] != null)
                {
                    this.cinva_unit = ds.Tables[0].Rows[0]["cinva_unit"].ToString();
                }
                if (ds.Tables[0].Rows[0]["bservice"] != null && ds.Tables[0].Rows[0]["bservice"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["bservice"].ToString() == "1") || (ds.Tables[0].Rows[0]["bservice"].ToString().ToLower() == "true"))
                    {
                        this.bservice = true;
                    }
                    else
                    {
                        this.bservice = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["iinvexchrate"] != null && ds.Tables[0].Rows[0]["iinvexchrate"].ToString() != "")
                {
                    this.iinvexchrate = decimal.Parse(ds.Tables[0].Rows[0]["iinvexchrate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["binvbatch"] != null && ds.Tables[0].Rows[0]["binvbatch"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["binvbatch"].ToString() == "1") || (ds.Tables[0].Rows[0]["binvbatch"].ToString().ToLower() == "true"))
                    {
                        this.binvbatch = true;
                    }
                    else
                    {
                        this.binvbatch = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["cbatch"] != null)
                {
                    this.cbatch = ds.Tables[0].Rows[0]["cbatch"].ToString();
                }
                if (ds.Tables[0].Rows[0]["dvdate"] != null && ds.Tables[0].Rows[0]["dvdate"].ToString() != "")
                {
                    this.dvdate = DateTime.Parse(ds.Tables[0].Rows[0]["dvdate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["dpdate"] != null && ds.Tables[0].Rows[0]["dpdate"].ToString() != "")
                {
                    this.dpdate = DateTime.Parse(ds.Tables[0].Rows[0]["dpdate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["imassdate"] != null && ds.Tables[0].Rows[0]["imassdate"].ToString() != "")
                {
                    this.imassdate = int.Parse(ds.Tables[0].Rows[0]["imassdate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cmassunit"] != null && ds.Tables[0].Rows[0]["cmassunit"].ToString() != "")
                {
                    this.cmassunit = int.Parse(ds.Tables[0].Rows[0]["cmassunit"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cgspstate"] != null)
                {
                    this.cgspstate = ds.Tables[0].Rows[0]["cgspstate"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ccloser"] != null)
                {
                    this.ccloser = ds.Tables[0].Rows[0]["ccloser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ioritaxcost"] != null && ds.Tables[0].Rows[0]["ioritaxcost"].ToString() != "")
                {
                    this.ioritaxcost = decimal.Parse(ds.Tables[0].Rows[0]["ioritaxcost"].ToString());
                }
                if (ds.Tables[0].Rows[0]["icorid"] != null && ds.Tables[0].Rows[0]["icorid"].ToString() != "")
                {
                    this.icorid = int.Parse(ds.Tables[0].Rows[0]["icorid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iquantity"] != null && ds.Tables[0].Rows[0]["iquantity"].ToString() != "")
                {
                    this.iquantity = decimal.Parse(ds.Tables[0].Rows[0]["iquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["inum"] != null && ds.Tables[0].Rows[0]["inum"].ToString() != "")
                {
                    this.inum = decimal.Parse(ds.Tables[0].Rows[0]["inum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ioricost"] != null && ds.Tables[0].Rows[0]["ioricost"].ToString() != "")
                {
                    this.ioricost = decimal.Parse(ds.Tables[0].Rows[0]["ioricost"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iorimoney"] != null && ds.Tables[0].Rows[0]["iorimoney"].ToString() != "")
                {
                    this.iorimoney = decimal.Parse(ds.Tables[0].Rows[0]["iorimoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ioritaxprice"] != null && ds.Tables[0].Rows[0]["ioritaxprice"].ToString() != "")
                {
                    this.ioritaxprice = decimal.Parse(ds.Tables[0].Rows[0]["ioritaxprice"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iorisum"] != null && ds.Tables[0].Rows[0]["iorisum"].ToString() != "")
                {
                    this.iorisum = decimal.Parse(ds.Tables[0].Rows[0]["iorisum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["icost"] != null && ds.Tables[0].Rows[0]["icost"].ToString() != "")
                {
                    this.icost = decimal.Parse(ds.Tables[0].Rows[0]["icost"].ToString());
                }
                if (ds.Tables[0].Rows[0]["imoney"] != null && ds.Tables[0].Rows[0]["imoney"].ToString() != "")
                {
                    this.imoney = decimal.Parse(ds.Tables[0].Rows[0]["imoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["itaxprice"] != null && ds.Tables[0].Rows[0]["itaxprice"].ToString() != "")
                {
                    this.itaxprice = decimal.Parse(ds.Tables[0].Rows[0]["itaxprice"].ToString());
                }
                if (ds.Tables[0].Rows[0]["isum"] != null && ds.Tables[0].Rows[0]["isum"].ToString() != "")
                {
                    this.isum = decimal.Parse(ds.Tables[0].Rows[0]["isum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbcloser"] != null)
                {
                    this.cbcloser = ds.Tables[0].Rows[0]["cbcloser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree1"] != null)
                {
                    this.cfree1 = ds.Tables[0].Rows[0]["cfree1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree2"] != null)
                {
                    this.cfree2 = ds.Tables[0].Rows[0]["cfree2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine22"] != null)
                {
                    this.cdefine22 = ds.Tables[0].Rows[0]["cdefine22"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine23"] != null)
                {
                    this.cdefine23 = ds.Tables[0].Rows[0]["cdefine23"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine24"] != null)
                {
                    this.cdefine24 = ds.Tables[0].Rows[0]["cdefine24"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine25"] != null)
                {
                    this.cdefine25 = ds.Tables[0].Rows[0]["cdefine25"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine26"] != null && ds.Tables[0].Rows[0]["cdefine26"].ToString() != "")
                {
                    this.cdefine26 = decimal.Parse(ds.Tables[0].Rows[0]["cdefine26"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine27"] != null && ds.Tables[0].Rows[0]["cdefine27"].ToString() != "")
                {
                    this.cdefine27 = decimal.Parse(ds.Tables[0].Rows[0]["cdefine27"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine28"] != null)
                {
                    this.cdefine28 = ds.Tables[0].Rows[0]["cdefine28"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine29"] != null)
                {
                    this.cdefine29 = ds.Tables[0].Rows[0]["cdefine29"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine30"] != null)
                {
                    this.cdefine30 = ds.Tables[0].Rows[0]["cdefine30"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine31"] != null)
                {
                    this.cdefine31 = ds.Tables[0].Rows[0]["cdefine31"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine32"] != null)
                {
                    this.cdefine32 = ds.Tables[0].Rows[0]["cdefine32"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine33"] != null)
                {
                    this.cdefine33 = ds.Tables[0].Rows[0]["cdefine33"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine34"] != null && ds.Tables[0].Rows[0]["cdefine34"].ToString() != "")
                {
                    this.cdefine34 = int.Parse(ds.Tables[0].Rows[0]["cdefine34"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine35"] != null && ds.Tables[0].Rows[0]["cdefine35"].ToString() != "")
                {
                    this.cdefine35 = int.Parse(ds.Tables[0].Rows[0]["cdefine35"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine36"] != null && ds.Tables[0].Rows[0]["cdefine36"].ToString() != "")
                {
                    this.cdefine36 = DateTime.Parse(ds.Tables[0].Rows[0]["cdefine36"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine37"] != null && ds.Tables[0].Rows[0]["cdefine37"].ToString() != "")
                {
                    this.cdefine37 = DateTime.Parse(ds.Tables[0].Rows[0]["cdefine37"].ToString());
                }
                if (ds.Tables[0].Rows[0]["itaxrate"] != null && ds.Tables[0].Rows[0]["itaxrate"].ToString() != "")
                {
                    this.itaxrate = decimal.Parse(ds.Tables[0].Rows[0]["itaxrate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["citemcode"] != null)
                {
                    this.citemcode = ds.Tables[0].Rows[0]["citemcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["citemname"] != null)
                {
                    this.citemname = ds.Tables[0].Rows[0]["citemname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["citem_class"] != null)
                {
                    this.citem_class = ds.Tables[0].Rows[0]["citem_class"].ToString();
                }
                if (ds.Tables[0].Rows[0]["citem_name"] != null)
                {
                    this.citem_name = ds.Tables[0].Rows[0]["citem_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iposid"] != null && ds.Tables[0].Rows[0]["iposid"].ToString() != "")
                {
                    this.iposid = int.Parse(ds.Tables[0].Rows[0]["iposid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fvalidquantity"] != null && ds.Tables[0].Rows[0]["fvalidquantity"].ToString() != "")
                {
                    this.fvalidquantity = decimal.Parse(ds.Tables[0].Rows[0]["fvalidquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fvalidnum"] != null && ds.Tables[0].Rows[0]["fvalidnum"].ToString() != "")
                {
                    this.fvalidnum = decimal.Parse(ds.Tables[0].Rows[0]["fvalidnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fvalidinquan"] != null && ds.Tables[0].Rows[0]["fvalidinquan"].ToString() != "")
                {
                    this.fvalidinquan = decimal.Parse(ds.Tables[0].Rows[0]["fvalidinquan"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fvalidinnum"] != null && ds.Tables[0].Rows[0]["fvalidinnum"].ToString() != "")
                {
                    this.fvalidinnum = decimal.Parse(ds.Tables[0].Rows[0]["fvalidinnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fkpquantity"] != null && ds.Tables[0].Rows[0]["fkpquantity"].ToString() != "")
                {
                    this.fkpquantity = decimal.Parse(ds.Tables[0].Rows[0]["fkpquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["finvalidquantity"] != null && ds.Tables[0].Rows[0]["finvalidquantity"].ToString() != "")
                {
                    this.finvalidquantity = decimal.Parse(ds.Tables[0].Rows[0]["finvalidquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["finvalidnum"] != null && ds.Tables[0].Rows[0]["finvalidnum"].ToString() != "")
                {
                    this.finvalidnum = decimal.Parse(ds.Tables[0].Rows[0]["finvalidnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["finvalidinquan"] != null && ds.Tables[0].Rows[0]["finvalidinquan"].ToString() != "")
                {
                    this.finvalidinquan = decimal.Parse(ds.Tables[0].Rows[0]["finvalidinquan"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fretquantity"] != null && ds.Tables[0].Rows[0]["fretquantity"].ToString() != "")
                {
                    this.fretquantity = decimal.Parse(ds.Tables[0].Rows[0]["fretquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["frefusequantity"] != null && ds.Tables[0].Rows[0]["frefusequantity"].ToString() != "")
                {
                    this.frefusequantity = decimal.Parse(ds.Tables[0].Rows[0]["frefusequantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["frefusenum"] != null && ds.Tables[0].Rows[0]["frefusenum"].ToString() != "")
                {
                    this.frefusenum = decimal.Parse(ds.Tables[0].Rows[0]["frefusenum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["frealquantity"] != null && ds.Tables[0].Rows[0]["frealquantity"].ToString() != "")
                {
                    this.frealquantity = decimal.Parse(ds.Tables[0].Rows[0]["frealquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["frealnum"] != null && ds.Tables[0].Rows[0]["frealnum"].ToString() != "")
                {
                    this.frealnum = decimal.Parse(ds.Tables[0].Rows[0]["frealnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cfree3"] != null)
                {
                    this.cfree3 = ds.Tables[0].Rows[0]["cfree3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree4"] != null)
                {
                    this.cfree4 = ds.Tables[0].Rows[0]["cfree4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree5"] != null)
                {
                    this.cfree5 = ds.Tables[0].Rows[0]["cfree5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree6"] != null)
                {
                    this.cfree6 = ds.Tables[0].Rows[0]["cfree6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree7"] != null)
                {
                    this.cfree7 = ds.Tables[0].Rows[0]["cfree7"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree8"] != null)
                {
                    this.cfree8 = ds.Tables[0].Rows[0]["cfree8"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree9"] != null)
                {
                    this.cfree9 = ds.Tables[0].Rows[0]["cfree9"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree10"] != null)
                {
                    this.cfree10 = ds.Tables[0].Rows[0]["cfree10"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine1"] != null)
                {
                    this.cinvdefine1 = ds.Tables[0].Rows[0]["cinvdefine1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine2"] != null)
                {
                    this.cinvdefine2 = ds.Tables[0].Rows[0]["cinvdefine2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine3"] != null)
                {
                    this.cinvdefine3 = ds.Tables[0].Rows[0]["cinvdefine3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine4"] != null)
                {
                    this.cinvdefine4 = ds.Tables[0].Rows[0]["cinvdefine4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine5"] != null)
                {
                    this.cinvdefine5 = ds.Tables[0].Rows[0]["cinvdefine5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine6"] != null)
                {
                    this.cinvdefine6 = ds.Tables[0].Rows[0]["cinvdefine6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine7"] != null)
                {
                    this.cinvdefine7 = ds.Tables[0].Rows[0]["cinvdefine7"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine8"] != null)
                {
                    this.cinvdefine8 = ds.Tables[0].Rows[0]["cinvdefine8"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine9"] != null)
                {
                    this.cinvdefine9 = ds.Tables[0].Rows[0]["cinvdefine9"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine10"] != null)
                {
                    this.cinvdefine10 = ds.Tables[0].Rows[0]["cinvdefine10"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine11"] != null && ds.Tables[0].Rows[0]["cinvdefine11"].ToString() != "")
                {
                    this.cinvdefine11 = int.Parse(ds.Tables[0].Rows[0]["cinvdefine11"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine12"] != null && ds.Tables[0].Rows[0]["cinvdefine12"].ToString() != "")
                {
                    this.cinvdefine12 = int.Parse(ds.Tables[0].Rows[0]["cinvdefine12"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine13"] != null && ds.Tables[0].Rows[0]["cinvdefine13"].ToString() != "")
                {
                    this.cinvdefine13 = decimal.Parse(ds.Tables[0].Rows[0]["cinvdefine13"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine14"] != null && ds.Tables[0].Rows[0]["cinvdefine14"].ToString() != "")
                {
                    this.cinvdefine14 = decimal.Parse(ds.Tables[0].Rows[0]["cinvdefine14"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine15"] != null && ds.Tables[0].Rows[0]["cinvdefine15"].ToString() != "")
                {
                    this.cinvdefine15 = DateTime.Parse(ds.Tables[0].Rows[0]["cinvdefine15"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine16"] != null && ds.Tables[0].Rows[0]["cinvdefine16"].ToString() != "")
                {
                    this.cinvdefine16 = DateTime.Parse(ds.Tables[0].Rows[0]["cinvdefine16"].ToString());
                }
                if (ds.Tables[0].Rows[0]["rejectsource"] != null && ds.Tables[0].Rows[0]["rejectsource"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["rejectsource"].ToString() == "1") || (ds.Tables[0].Rows[0]["rejectsource"].ToString().ToLower() == "true"))
                    {
                        this.rejectsource = true;
                    }
                    else
                    {
                        this.rejectsource = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["bgsp"] != null && ds.Tables[0].Rows[0]["bgsp"].ToString() != "")
                {
                    this.bgsp = int.Parse(ds.Tables[0].Rows[0]["bgsp"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvauthid"] != null && ds.Tables[0].Rows[0]["cinvauthid"].ToString() != "")
                {
                    this.cinvauthid = int.Parse(ds.Tables[0].Rows[0]["cinvauthid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["btaxcost"] != null && ds.Tables[0].Rows[0]["btaxcost"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["btaxcost"].ToString() == "1") || (ds.Tables[0].Rows[0]["btaxcost"].ToString().ToLower() == "true"))
                    {
                        this.btaxcost = true;
                    }
                    else
                    {
                        this.btaxcost = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["binspect"] != null && ds.Tables[0].Rows[0]["binspect"].ToString() != "")
                {
                    this.binspect = int.Parse(ds.Tables[0].Rows[0]["binspect"].ToString());
                }
                if (ds.Tables[0].Rows[0]["contractrowguid"] != null && ds.Tables[0].Rows[0]["contractrowguid"].ToString() != "")
                {
                    this.contractrowguid = new Guid(ds.Tables[0].Rows[0]["contractrowguid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iinvmpcost"] != null && ds.Tables[0].Rows[0]["iinvmpcost"].ToString() != "")
                {
                    this.iinvmpcost = decimal.Parse(ds.Tables[0].Rows[0]["iinvmpcost"].ToString());
                }
                if (ds.Tables[0].Rows[0]["irowno"] != null && ds.Tables[0].Rows[0]["irowno"].ToString() != "")
                {
                    this.irowno = int.Parse(ds.Tables[0].Rows[0]["irowno"].ToString());
                }
                if (ds.Tables[0].Rows[0]["sotype"] != null && ds.Tables[0].Rows[0]["sotype"].ToString() != "")
                {
                    this.sotype = int.Parse(ds.Tables[0].Rows[0]["sotype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csocode"] != null)
                {
                    this.csocode = ds.Tables[0].Rows[0]["csocode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdemandmemo"] != null)
                {
                    this.cdemandmemo = ds.Tables[0].Rows[0]["cdemandmemo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iordertype"] != null && ds.Tables[0].Rows[0]["iordertype"].ToString() != "")
                {
                    this.iordertype = int.Parse(ds.Tables[0].Rows[0]["iordertype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csoordercode"] != null)
                {
                    this.csoordercode = ds.Tables[0].Rows[0]["csoordercode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iorderseq"] != null && ds.Tables[0].Rows[0]["iorderseq"].ToString() != "")
                {
                    this.iorderseq = int.Parse(ds.Tables[0].Rows[0]["iorderseq"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iorderdid"] != null && ds.Tables[0].Rows[0]["iorderdid"].ToString() != "")
                {
                    this.iorderdid = int.Parse(ds.Tables[0].Rows[0]["iorderdid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ippartid"] != null && ds.Tables[0].Rows[0]["ippartid"].ToString() != "")
                {
                    this.ippartid = int.Parse(ds.Tables[0].Rows[0]["ippartid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ipquantity"] != null && ds.Tables[0].Rows[0]["ipquantity"].ToString() != "")
                {
                    this.ipquantity = decimal.Parse(ds.Tables[0].Rows[0]["ipquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iptoseq"] != null && ds.Tables[0].Rows[0]["iptoseq"].ToString() != "")
                {
                    this.iptoseq = int.Parse(ds.Tables[0].Rows[0]["iptoseq"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cveninvcode"] != null)
                {
                    this.cveninvcode = ds.Tables[0].Rows[0]["cveninvcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cveninvname"] != null)
                {
                    this.cveninvname = ds.Tables[0].Rows[0]["cveninvname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["sodid"] != null)
                {
                    this.sodid = ds.Tables[0].Rows[0]["sodid"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cordercode"] != null)
                {
                    this.cordercode = ds.Tables[0].Rows[0]["cordercode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["bexigency"] != null && ds.Tables[0].Rows[0]["bexigency"].ToString() != "")
                {
                    this.bexigency = int.Parse(ds.Tables[0].Rows[0]["bexigency"].ToString());
                }
                if (ds.Tables[0].Rows[0]["contractcode"] != null)
                {
                    this.contractcode = ds.Tables[0].Rows[0]["contractcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["contractrowno"] != null)
                {
                    this.contractrowno = ds.Tables[0].Rows[0]["contractrowno"].ToString();
                }
                if (ds.Tables[0].Rows[0]["fretnum"] != null && ds.Tables[0].Rows[0]["fretnum"].ToString() != "")
                {
                    this.fretnum = decimal.Parse(ds.Tables[0].Rows[0]["fretnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fsumrefusequantity"] != null && ds.Tables[0].Rows[0]["fsumrefusequantity"].ToString() != "")
                {
                    this.fsumrefusequantity = decimal.Parse(ds.Tables[0].Rows[0]["fsumrefusequantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fsumrefusenum"] != null && ds.Tables[0].Rows[0]["fsumrefusenum"].ToString() != "")
                {
                    this.fsumrefusenum = decimal.Parse(ds.Tables[0].Rows[0]["fsumrefusenum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fdtquantity"] != null && ds.Tables[0].Rows[0]["fdtquantity"].ToString() != "")
                {
                    this.fdtquantity = decimal.Parse(ds.Tables[0].Rows[0]["fdtquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["finvalidinnum"] != null && ds.Tables[0].Rows[0]["finvalidinnum"].ToString() != "")
                {
                    this.finvalidinnum = decimal.Parse(ds.Tables[0].Rows[0]["finvalidinnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["finspectquantity"] != null && ds.Tables[0].Rows[0]["finspectquantity"].ToString() != "")
                {
                    this.finspectquantity = decimal.Parse(ds.Tables[0].Rows[0]["finspectquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["finspectnum"] != null && ds.Tables[0].Rows[0]["finspectnum"].ToString() != "")
                {
                    this.finspectnum = decimal.Parse(ds.Tables[0].Rows[0]["finspectnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["vouchstate"] != null && ds.Tables[0].Rows[0]["vouchstate"].ToString() != "")
                {
                    this.vouchstate = int.Parse(ds.Tables[0].Rows[0]["vouchstate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fininquantity"] != null && ds.Tables[0].Rows[0]["fininquantity"].ToString() != "")
                {
                    this.fininquantity = decimal.Parse(ds.Tables[0].Rows[0]["fininquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fininnum"] != null && ds.Tables[0].Rows[0]["fininnum"].ToString() != "")
                {
                    this.fininnum = decimal.Parse(ds.Tables[0].Rows[0]["fininnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["dValidateDate"] != null)
                {
                    this.dValidateDate = ds.Tables[0].Rows[0]["dValidateDate"].ToString();
                }
                if (ds.Tables[0].Rows[0]["inspecexchrate"] != null && ds.Tables[0].Rows[0]["inspecexchrate"].ToString() != "")
                {
                    this.inspecexchrate = decimal.Parse(ds.Tables[0].Rows[0]["inspecexchrate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["irejectautoid"] != null && ds.Tables[0].Rows[0]["irejectautoid"].ToString() != "")
                {
                    this.irejectautoid = int.Parse(ds.Tables[0].Rows[0]["irejectautoid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iexpiratdatecalcu"] != null && ds.Tables[0].Rows[0]["iexpiratdatecalcu"].ToString() != "")
                {
                    this.iexpiratdatecalcu = int.Parse(ds.Tables[0].Rows[0]["iexpiratdatecalcu"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cexpirationdate"] != null)
                {
                    this.cexpirationdate = ds.Tables[0].Rows[0]["cexpirationdate"].ToString();
                }
                if (ds.Tables[0].Rows[0]["dexpirationdate"] != null && ds.Tables[0].Rows[0]["dexpirationdate"].ToString() != "")
                {
                    this.dexpirationdate = DateTime.Parse(ds.Tables[0].Rows[0]["dexpirationdate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["carrivalcode"] != null)
                {
                    this.carrivalcode = ds.Tables[0].Rows[0]["carrivalcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty1"] != null && ds.Tables[0].Rows[0]["cbatchproperty1"].ToString() != "")
                {
                    this.cbatchproperty1 = decimal.Parse(ds.Tables[0].Rows[0]["cbatchproperty1"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty2"] != null && ds.Tables[0].Rows[0]["cbatchproperty2"].ToString() != "")
                {
                    this.cbatchproperty2 = decimal.Parse(ds.Tables[0].Rows[0]["cbatchproperty2"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty3"] != null && ds.Tables[0].Rows[0]["cbatchproperty3"].ToString() != "")
                {
                    this.cbatchproperty3 = decimal.Parse(ds.Tables[0].Rows[0]["cbatchproperty3"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty4"] != null && ds.Tables[0].Rows[0]["cbatchproperty4"].ToString() != "")
                {
                    this.cbatchproperty4 = decimal.Parse(ds.Tables[0].Rows[0]["cbatchproperty4"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty5"] != null && ds.Tables[0].Rows[0]["cbatchproperty5"].ToString() != "")
                {
                    this.cbatchproperty5 = decimal.Parse(ds.Tables[0].Rows[0]["cbatchproperty5"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty6"] != null)
                {
                    this.cbatchproperty6 = ds.Tables[0].Rows[0]["cbatchproperty6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty7"] != null)
                {
                    this.cbatchproperty7 = ds.Tables[0].Rows[0]["cbatchproperty7"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty8"] != null)
                {
                    this.cbatchproperty8 = ds.Tables[0].Rows[0]["cbatchproperty8"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty9"] != null)
                {
                    this.cbatchproperty9 = ds.Tables[0].Rows[0]["cbatchproperty9"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbatchproperty10"] != null && ds.Tables[0].Rows[0]["cbatchproperty10"].ToString() != "")
                {
                    this.cbatchproperty10 = DateTime.Parse(ds.Tables[0].Rows[0]["cbatchproperty10"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cupsocode"] != null)
                {
                    this.cupsocode = ds.Tables[0].Rows[0]["cupsocode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ivouchrowno"] != null && ds.Tables[0].Rows[0]["ivouchrowno"].ToString() != "")
                {
                    this.ivouchrowno = int.Parse(ds.Tables[0].Rows[0]["ivouchrowno"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbmemo"] != null)
                {
                    this.cbmemo = ds.Tables[0].Rows[0]["cbmemo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbsysbarcode"] != null)
                {
                    this.cbsysbarcode = ds.Tables[0].Rows[0]["cbsysbarcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iproducttype"] != null && ds.Tables[0].Rows[0]["iproducttype"].ToString() != "")
                {
                    this.iproducttype = int.Parse(ds.Tables[0].Rows[0]["iproducttype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cmaininvcode"] != null)
                {
                    this.cmaininvcode = ds.Tables[0].Rows[0]["cmaininvcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["imainmodetailsid"] != null && ds.Tables[0].Rows[0]["imainmodetailsid"].ToString() != "")
                {
                    this.imainmodetailsid = int.Parse(ds.Tables[0].Rows[0]["imainmodetailsid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["isourcemocode"] != null)
                {
                    this.isourcemocode = ds.Tables[0].Rows[0]["isourcemocode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["isourcemodetailsid"] != null && ds.Tables[0].Rows[0]["isourcemodetailsid"].ToString() != "")
                {
                    this.isourcemodetailsid = int.Parse(ds.Tables[0].Rows[0]["isourcemodetailsid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["freworkquantity"] != null && ds.Tables[0].Rows[0]["freworkquantity"].ToString() != "")
                {
                    this.freworkquantity = decimal.Parse(ds.Tables[0].Rows[0]["freworkquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["freworknum"] != null && ds.Tables[0].Rows[0]["freworknum"].ToString() != "")
                {
                    this.freworknum = decimal.Parse(ds.Tables[0].Rows[0]["freworknum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fsumreworkquantity"] != null && ds.Tables[0].Rows[0]["fsumreworkquantity"].ToString() != "")
                {
                    this.fsumreworkquantity = decimal.Parse(ds.Tables[0].Rows[0]["fsumreworkquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fsumreworknum"] != null && ds.Tables[0].Rows[0]["fsumreworknum"].ToString() != "")
                {
                    this.fsumreworknum = decimal.Parse(ds.Tables[0].Rows[0]["fsumreworknum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["planlotnumber"] != null)
                {
                    this.planlotnumber = ds.Tables[0].Rows[0]["planlotnumber"].ToString();
                }
                if (ds.Tables[0].Rows[0]["bgift"] != null && ds.Tables[0].Rows[0]["bgift"].ToString() != "")
                {
                    this.bgift = int.Parse(ds.Tables[0].Rows[0]["bgift"].ToString());
                }
                if (ds.Tables[0].Rows[0]["dlineclosedate"] != null && ds.Tables[0].Rows[0]["dlineclosedate"].ToString() != "")
                {
                    this.dlineclosedate = DateTime.Parse(ds.Tables[0].Rows[0]["dlineclosedate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cfactorycode"] != null)
                {
                    this.cfactorycode = ds.Tables[0].Rows[0]["cfactorycode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfactoryname"] != null)
                {
                    this.cfactoryname = ds.Tables[0].Rows[0]["cfactoryname"].ToString();
                }
            }
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select * ");
            strSql.Append(" FROM [pu_arrbody] ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }

        #endregion  Method
    }
}